Cron expression syntax explained
A cron expression is five fields — minute, hour, day of month, month, day of week — read left to right. Once you know the fields and four special characters, any expression decodes in seconds.
The five fields
| Position | Field | Allowed values |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 or JAN–DEC |
| 5 | Day of week | 0–6 (0 = Sunday) or SUN–SAT |
Special characters
- * — any value (every minute, every hour…)
- */n — every n units: */15 in the minute field = every 15 minutes
- a-b — a range: 1-5 in day-of-week = Monday through Friday
- a,b,c — a list: 0,30 in minutes = on the hour and half past
Common examples
| Expression | Meaning |
|---|---|
| 0 9 * * 1-5 | 9:00 AM, Monday to Friday |
| */15 * * * * | Every 15 minutes |
| 0 0 1 * * | Midnight on the 1st of every month |
| 0 */6 * * * | Every 6 hours |
| 30 2 * * 0 | 2:30 AM every Sunday |
Tools used in this guide
Related guides
Cron expression syntax explained — FAQ
Left to right: minute, hour, day of month, month, day of week. '0 9 * * 1-5' = minute 0, hour 9, any date, any month, Mon–Fri.