Jenkins H Syntax: How Hash-Based Scheduling Prevents Thundering Herd
by Sinthuyan · April 8, 2026
Imagine 80 Jenkins pipelines, all configured with 0 * * * * — run at the top of every hour. At exactly 60 seconds past midnight, every pipeline fires simultaneously. Build agents get hammered, Git servers hit connection limits, and your Slack is full of "build started" notifications. This is the thundering herd problem, and Jenkins has a built-in solution: the H symbol.
What H Does
The H character substitutes a stable, job-specific hash into the schedule. Jenkins hashes the job name and uses the result to pick a consistent offset within the allowed range. Two key properties make this useful:
- Deterministic: the same job always resolves to the same offset. If your pipeline hashes to minute 23, it always runs at :23, every hour, every day. You can verify this in the build history.
- Distributed: different jobs get different offsets. Fifty pipelines with
H * * * *spread across the full 60-minute window instead of all firing at :00.
Basic H Patterns
H * * * *— once per hour, at a consistent but hash-derived minuteH H * * *— once per day, at a consistent hour and minuteH H * * 0— once per week on Sunday, at a consistent time
H with Step Values
Combining H with step syntax spreads repeated executions. H/15 * * * * fires approximately every 15 minutes within the hour — at H, H+15, H+30, H+45. If a particular job hashes to offset 7, it runs at :07, :22, :37, :52. Another job hashing to offset 3 runs at :03, :18, :33, :48. The total load on agents is spread across the full hour.
H with Range Constraints
You can constrain the hash to a subset of the allowed range using parentheses: H(X,Y). This is useful when you need a job to run within a specific window but still want load distribution within that window.
H(0,29) * * * *— once per hour, constrained to the first 30 minutesH(30,59) * * * *— once per hour, constrained to the second 30 minutesH H(9,16) * * 1-5— once during business hours (9 AM–4 PM) on weekdaysH(0,29)/10 * * * *— approximately every 10 minutes in the first half-hour
When Not to Use H
The H symbol is appropriate for jobs where timing flexibility is acceptable — build triggers, dependency checks, artifact cleanup. It is not appropriate for:
- Financial cutoffs: a payroll job that must run at exactly 11:55 PM cannot use H
- SLA-bound jobs: if a downstream system expects data at a specific minute, the hash offset must not vary from run to run — and it won't, but you need to know what that offset is
- Coordinated pipelines: if Pipeline B must start after Pipeline A finishes, H in A's schedule makes it harder to set a predictable start time for B
Predicting Your H Value
Jenkins resolves the hash at job configuration time and shows the actual next execution time in the build history sidebar. After saving a pipeline with an H expression, trigger a manual build or wait one cycle, then check "Estimated next run" in the sidebar — it will show the resolved time. Alternatively, hover over the schedule in the job's configuration page; Jenkins renders a human-readable tooltip like "every 1 hour on minute 23."
H on Pipelines vs Freestyle Jobs
The H syntax is available in both Declarative Pipeline Jenkinsfiles (triggers { cron('H * * * *') }) and Freestyle job configurations. The hash is always derived from the full job name including any folder path, so two identically named jobs in different folders will hash to different offsets.