Jenkins
Jenkins Cron Build Trigger Generator
Jenkins uses standard 5-field Unix cron plus the H modifier. H is deterministic — it hashes the job name to produce a fixed offset, spreading load without collisions. Jenkins defaults to server local time — use TZ= to override.
At 09:00 AM, Monday through Friday
Valid
- 1Thu, Apr 9, 2026, 9:00 AM
- 2Fri, Apr 10, 2026, 9:00 AM
- 3Mon, Apr 13, 2026, 9:00 AM
- 4Tue, Apr 14, 2026, 9:00 AM
- 5Wed, Apr 15, 2026, 9:00 AM
- 6Thu, Apr 16, 2026, 9:00 AM
- 7Fri, Apr 17, 2026, 9:00 AM
- 8Mon, Apr 20, 2026, 9:00 AM
- 9Tue, Apr 21, 2026, 9:00 AM
- 10Wed, Apr 22, 2026, 9:00 AM
Using H in Jenkins
H substitutes a stable, job-specific minute value derived from a hash of the job name. The same job always gets the same minute — it does not change between builds.
| Expression | Meaning |
|---|---|
H * * * * | Once per hour at a fixed minute (e.g. always :17 for this job) |
H 9 * * 1-5 | Weekdays at a fixed minute in the 9am hour |
H/15 * * * * | Every 15 minutes from a hashed starting point |
H(0-29) * * * * | Once per hour in the first 30 minutes |
H H(9-16) * * 1-5 | Once per day at a hashed time between 9am and 4pm on weekdays |
Timezone Override
# Prefix with TZ= to override server timezone
TZ=America/New_York H 9 * * 1-5
TZ=Africa/Lagos H 9 * * 1-5
TZ=Asia/Kolkata 0 9 * * 1-5 Jenkinsfile Pipeline Trigger
pipeline {
agent any
triggers {
cron('H 9 * * 1-5') // weekdays at a hashed minute in the 9am hour
}
stages {
stage('Build') {
steps { sh './build.sh' }
}
}
} @-Aliases in Jenkins
| Alias | Equivalent |
|---|---|
@hourly | H * * * * |
@daily / @midnight | H H * * * |
@weekly | H H * * 0 |
@monthly | H H 1 * * |
@annually / @yearly | H H 1 1 * |
Key Constraints
His deterministic — the same job always fires at the same minute (hash of job name)- Jenkins defaults to server local time — add
TZ=prefix to override per expression - @-aliases are supported;
@rebootis not (it is a system cron daemon feature, not a Jenkins one) - Enter expressions in Build Triggers → Build periodically, or in Jenkinsfile via the
triggersdirective
Jenkins Cron FAQ
What does H mean in a Jenkins cron expression?
H is a deterministic hash modifier — not random. Jenkins computes a fixed offset from the job name's hash. The same job always fires at the same minute offset. For example, a job named "deploy-prod" might always evaluate H 9 * * 1-5 as 9:17 AM, while "backup-db" evaluates it as 9:42 AM. This spreads load across the cluster without jobs competing at exactly :00.What timezone does Jenkins cron use by default?
Jenkins defaults to the server's local timezone — not UTC. This differs from Kubernetes, GitHub Actions, and CircleCI (all UTC by default). To override, prefix the expression with
TZ=timezone-name: TZ=Africa/Lagos H 9 * * 1-5. Use IANA timezone names (e.g. America/New_York, Europe/London, Asia/Kolkata).Can I use H in a range like H(0-29)?
Yes.
H(0-29) means "fire at a hashed minute between 0 and 29". This is useful when you want to avoid the second half of the hour. H/15 * * * * means "every 15 minutes starting from a hashed offset" — so if H resolves to 7, it fires at :07, :22, :37, :52.Does Jenkins support @-aliases like @daily?
Yes — Jenkins supports
@yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly. These expand to standard cron expressions. Jenkins does not support @reboot in the Build Periodically trigger — @reboot is a system cron daemon feature only.How do I configure a Jenkins job to build periodically?
In the Jenkins job configuration, go to Build Triggers → Build periodically and enter your cron expression. For Declarative Pipelines, use the
triggers directive in your Jenkinsfile: triggers { cron('H 9 * * 1-5') }. Changes to the Jenkinsfile trigger expression take effect on the next build of that pipeline.