On Tue, Sep 07, 2004 at 07:35:26AM -0700, Bill Randle wrote: <large snipping> > > > > > > 0 * * * * sleep $[ $RANDOM % 1800 ] ; /usr/local/bin/freshclam --quiet > > > > > > this causes it to sleep for a random period of time not exceeding > > > 30 min before executing. > > > > > > Rob > > > > > > Matt > > Slightly better, I think, is to add an offset to avoid hitting close to > the hour. This is what I use: > sleep $[ 900 + $RANDOM % 1800 ] > > which goes from 15 past to 15 to the hour. > > -Bill > Or simply place your offset into the crontab entry. EG:
12 * * * * sleep $[ $RANDOM % 1800 ] ; /usr/local/bin/freshclam --quiet Which would give you 12 to 42 minutes after the hour. Same effect. Different insertion point. UNIX: How many ways can we acomplish the same thing today? Choice is good. Cheers, L4J ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users