4 ms·
It would be kind of cool if cron could incorporate this sort of trick. Like have a deterministic way of starting stuff that is not urgent, but has to be done i
by m463 6y ago
It would be kind of cool if cron could incorporate this sort of trick.
Like have a deterministic way of starting stuff that is not urgent, but has to be done in a certain window.
for example, I have cron jobs that run every night, and I run them at times like 2:13 am and 2:27 am.
it would be nice to say: run this at 2:<prime> at night, different every night
It would be nicer to say: run these groups of things at night, in order, but at randomized non-overlapping times or similar
- xorcist 6y agoMany cron systems have this functionality. At least anacron and cronie (RHEL) supports the RANDOM_DELAY variable. Check your man 5 crontab. There's also systemd timers which can replace cron jobs with RandomizedDelay. Before that, people used to include a random sleep in the actual job. Personally, I tend to not use these things and instead pick a random start time when provisioning the job. That way the time delta between run is constant, which is often desired.
- m463 6y agoThe systems I use seem to have cron, but I will check it out. Thanks for the pointer.