| ▲ | PunchyHamster an hour ago | |
That's simple but consider "run something 4x per day but randomize a delay by hour so all of the 200 servers doing that task won't run it all at once" In cron, you basically have to either use your configuration management to generate those times, or have a random delay script running before the command In systemd timers, it's just
and the offset generated will be stable for the job on a given machine (i.e. always same on this machine but different on others) so you will get nice uniform distribution of load.If you add
the job will also be run once if there was one or more scheduled runs when the machine was down | ||
| ▲ | PenguinCoder 2 minutes ago | parent | next [-] | |
[delayed] | ||
| ▲ | simoncion an hour ago | parent | prev [-] | |
> In cron, you basically have to either use your configuration management to generate those times, or have a random delay script running before the command Nope. From crontab(5)
That's from my cronie install, but it looks like this has been a feature of some crons for at least a decade. (Notice that the post date of [0] is in 2016.) Given that cronie is based on vixie-cron, and I think I was was using vixie-cron in 2002, I bet it's been a thing for at least twenty years. | ||