[Gllug] Staggering cron entries
Tethys
tet at accucard.com
Thu Sep 12 11:02:59 UTC 2002
>No idea, but as a crude workaround, you could start your cron job
>with:
>
> sleep $(($(echo $$ | sum -r | cut -d' ' -f1) % 100))
Ooops. You need an extra step:
sleep $(($(echo $$ | sum -r | cut -d' ' -f1 | sed 's/^0*//') % 100))
Otherwise, a leading zero will cause the shell to interpret the number
as octal -- which won't work too well if it contains an 8 or a 9...
Tet
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list