Re: Creating a randomized cron entry
* Christoph Berg:
> Re: Florian Weimer in <firstname.lastname@example.org>
>> I'd like to create a cron entry which is run once a day, at some
>> random time. This is necessary because the cron entry will result in
>> a request over the network, and I want to avoid that all hosts in a
>> time zone pound the server at the same time.
> I guess it is ok if you create a fixed entry for a machine, and the
> different entries on different machines will then do the load
> balancing. Just pick two random numbers and put them in /etc/cron.d/.
Hmm, should the postrm script delete it during purge? It's not a
conffile, and I don't like changing files under /etc automatically.
> Keep in mind that Debian users usually expect that daily cronjobs will
> still be run if the machine is down at night and anacron is installed.
> You might want to add an additional @reboot job.
It's a bit more complicated than that because the program needs
network access, which might not be available at that point. I
probably need to put something under /etc/ppp/ip-up.d, too, and write
a small script which makes sure that the whole thing is only run once