From: Faiyaz Ahmed Date: Thu, 18 Oct 2007 18:04:14 +0000 (+0000) Subject: Update root packages twice a day, 12hrs apart. X-Git-Tag: NodeUpdate-0.5-2~3 X-Git-Url: http://git.onelab.eu/?p=nodeupdate.git;a=commitdiff_plain;h=90818a0946b5d2d5fb83c91a0173881f149b1edf Update root packages twice a day, 12hrs apart. --- diff --git a/NodeUpdate.py b/NodeUpdate.py index 28e635a..b0cd6d8 100644 --- a/NodeUpdate.py +++ b/NodeUpdate.py @@ -60,14 +60,14 @@ def UpdateCronFile(): 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.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." )