I would be interested in support for the jenkins cron syntax, using a hash of some identifier they do a deterministic spread of cron jobs. eg H/15 would for example give you execution at 4.234 / 19.234 / 34.234 / 49.234 th minute. Even on a restart/reschedule with the same Id you will end up with these execution times.
To allow periodically scheduled tasks to produce even load on the system, the symbol H (for “hash”) should be used wherever possible. For example, using 0 0 * * * for a dozen daily jobs will cause a large spike at midnight. In contrast, using H H * * * would still execute each job once a day, but not all at the same time, better using limited resources.
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/triggers/TimerTrigger/help-spec.html#L38
Implementation is done like this:
- Use the provided id and make a hash (md5)
- use that hash to initialize Random
- use this random to replace the H values
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/scheduler/Hash.java
I would be interested in support for the jenkins cron syntax, using a hash of some identifier they do a deterministic spread of cron jobs. eg H/15 would for example give you execution at 4.234 / 19.234 / 34.234 / 49.234 th minute. Even on a restart/reschedule with the same Id you will end up with these execution times.
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/triggers/TimerTrigger/help-spec.html#L38
Implementation is done like this:
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/scheduler/Hash.java