Formula
┌ minute (0–59) ┌ hour (0–23) ┌ day of month (1–31) ┌ month (1–12) ┌ day of week (0–6, Sunday = 0 or 7)* * * * * How it works
A cron expression is five fields separated by spaces: minute, hour, day of the month, month and day of the week. Each field can be * (every value), a single number, a list (1,15), a range (9-17), or a step (*/15 means every 15th value; 0-30/10 means 0, 10, 20, 30). Months and weekdays also accept three-letter names like JAN or MON.
One rule trips up almost everyone: when both day-of-month and day-of-week are restricted, cron runs when either matches, not both. "0 9 1 * MON" runs on the 1st of each month and also every Monday. If you want "the first Monday", you need a script-side check.
The upcoming run times are calculated in UTC from midnight of the date you choose. Real cron daemons use the server's time zone, so shift the results if your server is not on UTC — and remember that daylight-saving changes can skip or repeat jobs scheduled between 01:00 and 03:00 local time.
Frequently asked questions
How do I run a job every 5 minutes?
Use */5 * * * *. The step applies within the field, so it runs at :00, :05, :10 and so on — not five minutes after the previous run finished.
Why does my expression have 6 or 7 fields?
Some tools such as Quartz and Spring add a seconds field at the start and sometimes a year at the end. This explainer reads standard Unix/Linux crontab syntax with 5 fields, which is also what GitHub Actions, Kubernetes CronJobs and most cloud schedulers use.
Are L, W and # supported?
No. "Last day of month" (L), nearest weekday (W) and "nth weekday" (#) are Quartz extensions that standard cron does not understand.