New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments for Randomly spacing cron jobs #1646
Comments
We have a bunch of systems all around the world where we want to perform backups at 12:00, 16:00, and 20:00 local time each day. We had noticed that at the top of most hours the backup server started feeling a bit taxed because of so many systems hitting it all at once, so we implemented a random 999 second start time delay for the backup routine. We have been using the following to set our randomness:
I must say that using RANDOM sure seems easier:
|
If you deploy using Ansible or similar you can create the cronjob with a random offset for each host that you are configuring. |
On Ubuntu 16.04, the only syntax that worked was:
|
I am happy to see that The feature was added to cronie in Git on 2021-11-08 and appeared on 2022-05-31 in cronie 1.5.7-7 on CentOS Stream 9 and on 2022-05-02 in cronie 1.5.2-7 on CentOS Stream 8. Strange to see it appears there but not yet in Fedora. |
Comments for https://www.endpointdev.com/blog/2020/06/randomly-spacing-cron-jobs/
By Jon Jensen
To enter a comment:
The text was updated successfully, but these errors were encountered: