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

Position Field Range Notes
1 Minute 0–59 0 = top of the hour
2 Hour 0–23 24-hour clock, UTC recommended
3 Day-of-Month 1–31 Months with fewer days skip higher values
4 Month 1–12 JAN–DEC abbreviations accepted
5 Day-of-Week 0–7 0 and 7 both = Sunday; SUN–SAT accepted

Special Characters

Char Name Example Meaning
* Wildcard * * * * * Matches every value in the field
/ Step */15 * * * * Every 15 minutes (0, 15, 30, 45)
- Range 0 9-17 * * * Every hour from 9 AM through 5 PM
, List 0 0 1,15 * * 1st and 15th of every month
? No specific value 0 0 0 ? * MON Quartz/EventBridge: skip DOM, use DOW
L Last 0 0 0 L * ? Last day of the month (Quartz/EventBridge)
W Nearest weekday 0 0 0 15W * ? Nearest weekday to the 15th (Quartz)
# Nth weekday 0 0 0 ? * 2#1 First Monday of the month (Quartz)
H Hash H/15 * * * * Stable hash offset every 15 min (Jenkins)

Common Patterns

Expression Meaning
* * * * * 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-5 Weekdays at 9:00 AM
0 0 1 * * First day of every month at midnight
0 0 * * 1 Every Monday at midnight
*/15 * * * * Every 15 minutes
0 0 L * * Last day of every month at midnight

Dialect Comparison

Feature Standard Quartz Jenkins EventBridge
Fields 5 6–7 5 6
Seconds No Yes (field 1) No No
Year No Optional (field 7) No Required (field 6)
? char No Yes No Yes
L char No Yes No Yes
W char No Yes No Yes
# char No Yes No Yes
H char No No Yes No