Cron Expression Cheatsheet

All 5 cron fields, valid ranges, special characters, @-aliases, and Quartz extensions — on one page.

Try the interactive builder →

Field Reference

Position Field Allowed values Special chars
1 Minuteminute0–59* / - ,
2 Hourhour0–23* / - ,
3 Day of monthdom1–31* / - , ? (Quartz: L W)
4 Monthmonth1–12 or JAN–DEC* / - ,
5 Day of weekdow0–6 or SUN–SAT* / - , ? (Quartz: L #)
0* Second (Quartz)sec0–59* / - ,

Special Characters

CharacterNameMeaningExample
*WildcardEvery valid value* * * * * → every minute
/StepEvery Nth value*/15 * * * * → every 15 min
-RangeFrom–to (inclusive)9-17 * * * * → 9am to 5pm
,ListSpecific values0,15,30,45 * * * *
?No valueQuartz only — "any" for dom or dow0 12 15 * ?
LLastQuartz only — last day of month or week0 0 L * ? → last day of month
WWeekdayQuartz only — nearest weekday to given date0 0 15W * ?
#Nth weekdayQuartz only — Nth occurrence in month0 0 ? * 2#1 → 1st Monday

@-Aliases (Shorthand)

AliasEquivalent expressionDescription
@yearly / @annually0 0 1 1 *Once a year, midnight Jan 1
@monthly0 0 1 * *Once a month, midnight 1st
@weekly0 0 * * 0Once a week, midnight Sunday
@daily / @midnight0 0 * * *Once a day, midnight
@hourly0 * * * *Once an hour, :00
@rebootOn system startup (Linux cron only)

Jenkins H Modifier

Jenkins cron adds the H (hash) modifier. H is deterministic, not random — it computes a fixed offset from the job name hash, so the same job always runs at the same minute. This spreads load across the cluster without multiple jobs competing at :00.

ExpressionMeaning
H * * * *Once per hour at a fixed minute (e.g. always :17 for this job)
H 9 * * 1-5Weekdays at some minute in the 9 o'clock hour (load-spread)
H/15 * * * *Every 15 min from a hashed starting offset
H(0-29) * * * *Every hour in the first 30 minutes
TZ=America/New_York H 9 * * 1-5TZ= prefix overrides server timezone

Jenkins defaults to server local time (not UTC). Use the TZ= prefix to override. @-aliases (@daily, @weekly, etc.) are also supported.

30-Second Common Patterns

ExpressionMeaning
* * * * *Every minute
*/5 * * * *Every 5 minutes
0 * * * *Every hour at :00
0 9 * * *Daily at 9:00 AM
0 9 * * 1-5Weekdays at 9:00 AM
0 0 * * 0Sundays at midnight
0 0 1 * *1st of every month at midnight
0 0 1 1 *January 1st at midnight
0 2 * * *Daily at 2:00 AM (common for backups)
0 9-17 * * 1-5Every hour during business hours (weekdays)

Frequently Asked Questions

What is the cron syntax for the last day of the month?
In standard Unix cron there is no built-in "last day" syntax. Use 28-31 and handle shorter months in your script, or switch to Quartz cron which supports L in the day-of-month field.
Can I use month names like JAN or weekday names like MON in cron?
Yes. Most cron implementations accept 3-letter abbreviations: JAN–DEC for months and SUN–SAT for weekdays. For example 0 0 1 JAN,JUL * fires on Jan 1 and Jul 1.
What is the difference between <code>0 0 * * 0</code> and <code>@weekly</code>?
They are equivalent. @weekly is a shorthand alias that expands to 0 0 * * 0 — midnight on Sunday. Aliases like @daily, @hourly, and @monthly work the same way.