[Gllug] Staggering cron entries
Alain Williams
addw at phcomp.co.uk
Thu Sep 12 11:09:30 UTC 2002
On Thu, Sep 12, 2002 at 12:29:40PM +0200, John Hearns wrote:
> 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.
I have some hacks to vixie cron to help with this:
*/5 * * * * Command1
*/5+3 * * * * Command2
I added '+n', so that this means:
Run both commands every 5 minutes, Command1 at 0,5,10,... mins past the hour
& Command2 at 3,8,13,... mins past the hour.
I can send the patches/source if you want. I have been meaning to return
the patches to paul vixie, not quite got round to it.
The patch includes the ability to run something on the last-day-of-month
(whatever that is this month).
This wasn't quite what John asked for, but might help.
--
Alain Williams
#include <std_disclaimer.h>
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list