[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating a randomized cron entry

On Thu, Dec 15, 2005 at 03:24:00PM -0500, Justin Pryzby wrote:
> This of course has the possibility of running multiple times, so you
> might have to include into the cronjob a test:
>   rm /var/run/foo/ran-today 2>/dev/null && exit 0
> It also doesn't guarantee that it runs at all in any given day, or
> that the hosts don't all peg the network at the same time.

Well, it is random of course. If the distribution is uniform you're
granted that in the long run it will be run on the average once per day.
I don't know how stringent were the requirements that the program should
be run once per day, no more, no less ...


Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-

Attachment: signature.asc
Description: Digital signature

Reply to: