Skip to content
Latchkey

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
// 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

  1. Replace fixed minute/hour with H so Jenkins picks a stable but distributed time.
  2. Constrain ranges where needed, e.g. H(0-59) H(0-6).
  3. Confirm the resolved time in the job configuration.
Jenkinsfile
// 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.

Jenkinsfile
triggers { cron('H H(2-4) * * *') }  // between 02:00 and 04:59

How to prevent it

  • Prefer H over 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.

Frequently asked questions

What causes "Jenkins H spreads scheduled load"?
A fixed minute like 0 0 * * * starts every job that uses it at the same instant, overloading the controller.
How do I fix Jenkins H spreads scheduled load?
Use H to spread the schedule

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card