[FEATURE REQUEST] random/N for salt.states.cron
@dwoz is already working on this.
Since Jul 19, 2021.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Describe the solution you'd like
salt.states.cron currently supports values like minute: '*/5' to run every 5 minutes. If I understand correctly, that runs on minutes 0, 5, 10, etc., right? There's also support for minute: 'random' to run on a random minute. It would be nice to have the combination of those two features so something like minute: 'random/5' would run every 5 minutes, starting on a random minute between 0 and 4.
Describe alternatives you've considered
I'm not aware of any other easy way to spread out cron jobs that run every N minutes/hours/etc. It is possible for a cron job to sleep for a random amount of time before doing anything else though.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.