git://git.onelab.eu
/
nodeupdate.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55519de
)
Update root packages twice a day, 12hrs apart.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Thu, 18 Oct 2007 18:04:14 +0000
(18:04 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Thu, 18 Oct 2007 18:04:14 +0000
(18:04 +0000)
NodeUpdate.py
patch
|
blob
|
history
diff --git
a/NodeUpdate.py
b/NodeUpdate.py
index
28e635a
..
b0cd6d8
100644
(file)
--- a/
NodeUpdate.py
+++ b/
NodeUpdate.py
@@
-60,14
+60,14
@@
def UpdateCronFile():
try:
randomMinute= Random().randrange( 0, 59, 1 );
try:
randomMinute= Random().randrange( 0, 59, 1 );
- randomHour= Random().randrange( 0,
23
, 1 );
+ randomHour= Random().randrange( 0,
11
, 1 );
f = open( CRON_FILE, 'w' );
f.write( "# %s\n" % (TARGET_DESC) );
f.write( "MAILTO=%s\n" % (TARGET_USER) );
f.write( "SHELL=%s\n" % (TARGET_SHELL) );
f = open( CRON_FILE, 'w' );
f.write( "# %s\n" % (TARGET_DESC) );
f.write( "MAILTO=%s\n" % (TARGET_USER) );
f.write( "SHELL=%s\n" % (TARGET_SHELL) );
- f.write( "%s %s * * * %s %s\n\n" %
- (randomMinute, randomHour, TARGET_USER, TARGET_SCRIPT) );
+ f.write( "%s %s
,%s
* * * %s %s\n\n" %
+ (randomMinute, randomHour,
randomHour + 12,
TARGET_USER, TARGET_SCRIPT) );
f.close()
print( "Created new cron.d entry." )
f.close()
print( "Created new cron.d entry." )