Jenkins cron H syntax for scheduled builds in CI
Jenkins cron supports an H (hash) symbol that spreads jobs across a range so they do not all fire at the same instant. Writing a literal 0 0 * * * makes every job start at midnight and overload the controller; H H * * * staggers them.
What this error means
Many Jenkins jobs pinned to 0 0 * * * all start at once, spiking load and queueing, whereas the intent was just "once a day".
// Jenkinsfile - thundering herd: every job at midnight
triggers { cron('0 0 * * *') }Common causes
Literal times cause a thundering herd
A fixed minute like 0 0 * * * starts every job that uses it at the same instant, overloading the controller.
Not using the H symbol
Jenkins provides H to distribute triggers, but many pipelines still hardcode exact minutes.
How to fix it
Use H to spread the schedule
- Replace fixed minute/hour with
Hso Jenkins picks a stable but distributed time. - Constrain ranges where needed, e.g.
H(0-59) H(0-6). - Confirm the resolved time in the job configuration.
// once a day, staggered by Jenkins
triggers { cron('H H * * *') }Pin a window but still hash within it
Use H within a range to keep runs in a nightly window while avoiding a synchronized start.
triggers { cron('H H(2-4) * * *') } // between 02:00 and 04:59How to prevent it
- Prefer
Hover literal minutes for scheduled Jenkins jobs. - Use ranges with H to keep runs in a window.
- Avoid many jobs sharing the exact same trigger time.