How to read a cron expression
A standard cron expression is a whitespace-separated string of five fields—minute, hour, day of the month, month, and day of the week—that defines a recurring schedule. Each field accepts:
*(asterisk) — matches every possible value for that field.,(list) — matches any listed value, such as0,30orMON,WED,FRI.-(range) — matches an inclusive range, such as9-17or1-5./(step) — matches every nth value within a range, such as*/5(every 5 units) or1-31/2(odd days).
Supported cron dialects
- Normal (Standard): 5 fields (or 6 fields with a leading seconds field), day-of-week
0–7(where 0 and 7 are both Sunday), and shorthand macros (@yearly,@monthly,@weekly,@daily,@hourly,@reboot). Used by Linux/macOScrontab, Kubernetes CronJobs, GitHub Actions, and Google Cloud Scheduler. - Quartz: 6 or 7 fields (starting with seconds and ending with an optional year), day-of-week
1–7(1 = Sunday), and special characters?(no specific day),L(last day/weekday),W(nearest weekday), and#(nth weekday of the month, such as6#3for the third Friday). - AWS EventBridge: 6 fields (
minute hour day-of-month month day-of-week year), day-of-week1–7(1 = Sunday), requires?in either day-of-month or day-of-week, and evaluates schedules in UTC. - Jenkins: 5 fields with the
H(hash) symbol—such asH/15 * * * *orH H(9-16)/2 * * 1-5—which spreads job runs evenly by hashing the job name.
Frequently asked questions
- What happens when both day-of-month and day-of-week are specified in standard cron?
- In standard Vixie/Unix cron (and Jenkins), when both day-of-month and day-of-week are restricted (neither is *), a date matches if EITHER field matches (logical OR). For example, 0 0 15 * 5 runs on the 15th of every month AND on every Friday. In Quartz and AWS EventBridge, you must place ? in one of the two day fields.
- What is the difference between Normal cron, Quartz, AWS EventBridge, and Jenkins syntax?
- Normal Unix cron uses 5 fields (minute, hour, day-of-month, month, day-of-week 0–6 or 0–7 where 0 and 7 are Sunday), or 6 fields with a leading seconds field. Quartz uses 6 or 7 fields (second, minute, hour, day-of-month, month, day-of-week 1–7, optional year) and adds ?, L, W, and #. AWS EventBridge always uses 6 fields (minute through year, no seconds), numbers days of week 1–7, requires ? in one day field, and runs in UTC. Jenkins uses 5 fields and adds H (hash) to spread load across a time window.
- What does H mean in a Jenkins cron expression?
- In Jenkins, H stands for "hash". Instead of every job with 0 * * * * firing at the exact top of the hour and causing a CPU spike, H * * * * hashes the job name to pick a deterministic minute (0–59) unique to that job. You can also combine H with steps or ranges, such as H/15 * * * * or H H(9-16)/2 * * 1-5.
- Why does */7 in the minute field run at uneven intervals at the end of the hour?
- In cron, */7 is shorthand for a step of 7 across the 0–59 minute range: it fires at minutes 0, 7, 14, 21, 28, 35, 42, 49, and 56, then fires again at minute 0 of the next hour (only 4 minutes after :56). Cron evaluates each hour independently rather than keeping a rolling timer across hours.
- Does cron use local server time or UTC?
- Traditional Unix crontab and Quartz evaluate schedules in the host server or JVM time zone unless configured otherwise. Managed cloud schedulers such as AWS EventBridge, GitHub Actions, and Kubernetes CronJobs (by default) evaluate schedules in UTC. Use the Local / UTC toggle above to compare upcoming run times in both.