Cron Cheatsheet

Quick reference for cron expression syntax — field ranges, special characters, common patterns, and dialect differences in one page.

Field Reference

Standard 5-field cron expression: minute hour day-of-month month day-of-week

PositionFieldRangeNotes
1Minute0–590 = top of the hour
2Hour0–2324-hour clock, UTC recommended
3Day-of-Month1–31Months with fewer days skip higher values
4Month1–12JAN–DEC abbreviations accepted
5Day-of-Week0–70 and 7 both = Sunday; SUN–SAT accepted

Special Characters

CharNameExampleMeaning
*Wildcard* * * * *Matches every value in the field
/Step*/15 * * * *Every 15 minutes (0, 15, 30, 45)
-Range0 9-17 * * *Every hour from 9 AM through 5 PM
,List0 0 1,15 * *1st and 15th of every month
?No specific value0 0 0 ? * MONQuartz/EventBridge: skip DOM, use DOW
LLast0 0 0 L * ?Last day of the month (Quartz/EventBridge)
WNearest weekday0 0 0 15W * ?Nearest weekday to the 15th (Quartz)
#Nth weekday0 0 0 ? * 2#1First Monday of the month (Quartz)
HHashH/15 * * * *Stable hash offset every 15 min (Jenkins)

Common Patterns

ExpressionMeaning
* * * * *Every minute
*/5 * * * *Every 5 minutes
0 * * * *Every hour (at minute 0)
0 0 * * *Daily at midnight
0 2 * * *Daily at 2:00 AM
0 9 * * 1-5Weekdays at 9:00 AM
0 0 1 * *First day of every month at midnight
0 0 * * 1Every Monday at midnight
*/15 * * * *Every 15 minutes
0 0 L * *Last day of every month at midnight

Dialect Comparison

FeatureStandardQuartzJenkinsEventBridge
Fields56–756
SecondsNoYes (field 1)NoNo
YearNoOptional (field 7)NoRequired (field 6)
? charNoYesNoYes
L charNoYesNoYes
W charNoYesNoYes
# charNoYesNoYes
H charNoNoYesNo