How to read a cron expression
A standard cron expression has five fields separated by spaces. Each field says when the job may run:
| Field | Allowed values | Example |
|---|---|---|
| Minute | 0–59 | 30 = at minute 30 |
| Hour | 0–23 | 9 = 9 AM |
| Day of month | 1–31 | 1 = the 1st |
| Month | 1–12 or JAN–DEC | * = every month |
| Day of week | 0–6 or SUN–SAT | 1-5 = Monday to Friday |
Special characters
*means every value: every minute, every hour and so on.,lists values:0,30means at minute 0 and 30.-is a range:9-17means 9 AM to 5 PM./is a step:*/15means every 15 minutes.- Shortcuts like
@daily,@hourlyand@weeklyare understood too.
The time zone trap
Cron runs in the time zone of the machine it's on, and most servers, Docker containers and GitHub Actions use UTC. A job written as 0 9 * * * runs at 9 AM UTC, which is 2 PM in Pakistan or 4 AM in New York. That's why this explainer shows the next runs in your own time zone and in UTC side by side.
Common cron schedules
| Expression | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour, on the hour |
0 0 * * * | Every day at midnight |
0 9 * * 1-5 | Weekdays at 9:00 |
0 0 1 * * | The first day of every month |
0 0 * * 0 | Every Sunday at midnight |
Questions people ask
What does */5 mean in cron?
It means every 5 units of that field. In the minute field, */5 runs the job every 5 minutes.
Does cron use my local time or UTC?
Cron uses the time zone of the machine it runs on. Most servers and GitHub Actions use UTC, so compare the two run lists shown by the explainer.
Is Sunday 0 or 7 in cron?
In standard cron, Sunday is 0. Many systems also accept 7 for Sunday, and you can write SUN to avoid confusion.
Does it support cron expressions with seconds?
Yes. A 6-field expression is read with seconds as the first field, as used by Spring, Quartz-style and some Node.js schedulers.
What happens if I set both day of month and day of week?
In standard cron the job runs when either one matches, not only when both match. This is a common source of surprise runs.
Is my cron expression sent anywhere?
No. Everything is worked out in your browser.