[Gllug] Staggering cron entries

Tethys tet at accucard.com
Thu Sep 12 10:38:08 UTC 2002


>I have a dim memory at the back of my mind about
>the possibility or randomly smearing cron entries in time,
>for example in a large cluster you might not want all of
>the nodes downloading something at exactly the same second,
>or making a connection to an HTTP server - or whatever.
>
>I Was sure this was possible, but an RTFM on vixie cron
>didn't turn anything up. 
>Someone please enlighten me.

No idea, but as a crude workaround, you could start your cron job
with:

	sleep $(($(echo $$ | sum -r | cut -d' ' -f1) % 100))

Obviously, you can increase or decrease the 100 to whatever timescale
you want.

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list