Den tors 16 apr. 2020 kl 20:22 skrev Andreas Kusalananda Kähäri < andreas.kah...@abc.se>:
> On Thu, Apr 16, 2020 at 11:14:59AM -0600, Theo de Raadt wrote: > > That is a lot of words to cover a simple concept: > > > > The specific random values are selected when cron(5) loads > > the crontab file. New numbers are chosen when crontab -e is used. > > If you understand that, the conclusions are obvious. > > Ah. Good. Then I know the restrictions. The random times are random, > but fixed for the lifetime of the cron daemon (or until the crontab is > reloaded due to being edited). > It would be very weird otherwise, if the 24h random example was used, then it chose 00:01, ran your "bin/true" command and then re-randomized, it would most certainly end up wanting to run again, perhaps twice or more. So if it re-randomized after each execution it would have to keep a 24h timer going (in your example, a per-week, a per-month timer also) to make sure the newly randomized 11:12 time is actually tomorrows 11:12 and not the upcoming one in this day. Also, re-randomization would also mean it could start your one hour backup at 23:59 and once more in 00:01 the next day, which would cause lots of unexpected chaos for anyone expecting a daily one-hour job to not collide with itself. -- May the most significant bit of your life be positive.