Jenkins Cron Syntax Guide (2026) — Hash, H, and How to Stop the 3AM Stampede
Jenkins cron uses a special H (hash) symbol nobody explains well. Learn how H, H(0-30), and @midnight jitter work, with copy-paste examples for pipelines, multibranch, and shared libraries.
2026-07-17 · By Avinash Kamble, reviewed by Priyanka G.
Jenkins cron looks like POSIX cron, but it has one feature no other scheduler has: the H (hash) symbol. Used correctly, it prevents the classic problem where every job on your controller fires at exactly 0 0 * * * and grinds the queue to a halt. This guide shows how to use it properly.
The 5 fields - same as POSIX
MIN HOUR DOM MON DOW
0-59 0-23 1-31 1-12 0-7 (0 and 7 both = Sunday)Written inside a triggers { cron('...') } block in a declarative pipeline, or in the "Build periodically" box for freestyle jobs.
H - the Jenkins-only symbol that saves your controller
H tells Jenkins "pick a stable but hashed value based on the job name". Two jobs with H 2 * * * will each pick a different minute between 0 and 59 - deterministically, so they don't drift between restarts.
H * * * * # once per hour, on a hashed minute
H/15 * * * * # every 15 minutes, hashed start (0-14, 15-29, ...)
H 2 * * * # daily at 2:HH, minute hashed by job name
H H(0-7) * * * # daily some time between midnight and 7:59 AM
H H * * 1-5 # once a day on weekdays, fully spreadAliases with jitter
@hourly -> H * * * *
@daily -> H H * * *
@midnight -> H H(0-2) * * * (spreads across midnight +/- 2h)
@weekly -> H H * * H
@monthly -> H H H * *
@yearly -> H H H H *Prefer these aliases in shared libraries - every downstream job gets automatic jitter without asking.
Declarative pipeline - the copy-paste block
pipeline {
agent any
triggers {
// Nightly regression, hashed to avoid the 2 AM stampede
cron('H H(1-4) * * *')
// Poll SCM every 5 min, hashed start
pollSCM('H/5 * * * *')
}
stages {
stage('Test') { steps { sh 'npm test' } }
}
}Multibranch pipelines - cron per branch
triggers {
cron(env.BRANCH_NAME == 'main' ? 'H H(1-3) * * *' : '')
}Only main gets a nightly build; feature branches skip the schedule.
Validate before you commit
A broken cron string silently disables the trigger - Jenkins won't fail the build config, it just never fires. Before committing, paste your expression into the Cron Expression Builder & Tester to see the next 10 run times, then use the Jenkins export tab to copy the exact triggers { cron('...') } block.
Frequently asked questions
1.Does Jenkins support seconds in cron?
2.Is H random each run?
3.Why is my nightly job running at a weird minute like 47?
4.Can I use timezones in Jenkins cron?
Practice these questions
Rehearse Selenium and Playwright automation questions covering framework design, waits, locators and CI/CD.
Was this article helpful?
More from CI/CD Jenkins
Pipelines, agents, shared libraries.
Keep building your QA edge
Pillar guides- Cron Expression Builder & Testerbuild and test cron for Jenkins and GitHub ActionsVisual cron builder with next-10 run times, timezone picker, and one-click export to Jenkins, GitHub Actions, Kubernetes CronJob, Quartz, Node-cron, and pg_cron.
- AI Mock Interviewpractice these questions with our AI mock interviewLive AI-powered mock interviews with rubric feedback.
- ATS Resume ReviewATS Resume ReviewFree AI ATS scoring with rewrite suggestions.
Continue reading

Playwright Locator Best Practices (2026) — The Only Guide You Need
11 min read
How to Migrate a Postman Collection to Playwright API Tests (2026 Guide)
12 min read
Why Every QA Engineer Must Master CI/CD Pipelines in 2026 (Or Risk Obsolescence)
12 min readJoin the QA Community
Connect with fellow testers, share job leads, and get career advice.
Stop Reinventing the Wheel. Upgrade Your QA Arsenal.
Take your testing skills from beginner to Lead Engineer. Supercharge your daily workflow with our premium digital resources.
- Ready-to-use testing strategy templates
- Advanced API & UI automation guides
- ⏱️ Save 10+ hours a week on test planning