How Cron Expressions Work: A Complete Field Reference
by Sinthuyan · April 1, 2026
A cron expression is a compact string that tells a scheduler when to run a job. Standard cron expressions have five space-separated fields, evaluated every minute by the cron daemon. When all five fields match the current time simultaneously, the job executes.
The Five Fields
Reading left to right, the fields are: minute, hour, day-of-month, month, and day-of-week. Each field has a valid numeric range, and each can hold a literal value, a wildcard, or a special character.
| Position | Field | Range | Notes |
|---|---|---|---|
| 1 | Minute | 0–59 | 0 = top of the hour |
| 2 | Hour | 0–23 | 24-hour clock, UTC by default |
| 3 | Day-of-month | 1–31 | Months with fewer days skip higher values |
| 4 | Month | 1–12 or JAN–DEC | Three-letter abbreviations are case-insensitive |
| 5 | Day-of-week | 0–7 or SUN–SAT | Both 0 and 7 represent Sunday |
Special Characters
Special characters let you express patterns beyond single values:
*— matches every value in that field (wildcard),— separates a list of values:1,15,30in minute = at minutes 1, 15, and 30-— defines a range:9-17in hour = every hour from 9am through 5pm inclusive/— defines a step:*/15in minute = every 15 minutes;10/5= at 10, 15, 20, 25…?— "no specific value" — Quartz scheduler only; used in either DOM or DOW when the other is setL— "last" — Quartz only;Lin DOM = last day of the monthW— "nearest weekday" — Quartz only;15W= the weekday nearest the 15th#— "nth occurrence" — Quartz only;2#1in DOW = first Monday of the month
Practical Examples
0 2 * * *— runs at 2:00 AM every day*/15 * * * *— runs every 15 minutes (at :00, :15, :30, :45)0 9 * * 1-5— runs at 9:00 AM Monday through Friday0 0 1 * *— runs at midnight on the first day of every month30 6 * * 1— runs at 6:30 AM every Monday
How the Scheduler Evaluates
The cron daemon wakes up every minute and checks whether the current time matches all five fields simultaneously. An asterisk in a field never blocks a match — it always passes. Every other character narrows the match.
For example, 0 9 * * 1-5 matches when: minute is exactly 0, hour is exactly 9, any day of the month, any month, and the weekday is Monday through Friday. At 9:00 AM on a Saturday, the DOW field fails to match, so the job does not run.
Common Misconception: Step Values
The expression */5 in the minute field does not mean "every 5 minutes from the last run." It means "at minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55" — regardless of when the job last executed or when the daemon started. This distinction matters when a job takes variable time to complete: cron does not track elapsed time between runs, only absolute clock positions.
Standard vs Extended Dialects
Standard Unix cron (Vixie cron, cronie) uses exactly five fields. Extended dialects add fields: Quartz Scheduler prepends a seconds field and appends an optional year field (making it 6–7 fields total). AWS EventBridge appends a mandatory year field. Jenkins adds the H hash symbol. Always confirm the dialect your scheduler expects before writing expressions — a 5-field expression in a 6-field context shifts every field right by one, silently changing execution times.