What Is a Cron Expression?
Cron is the time-based job scheduler built into Linux and Unix systems, and its compact expression syntax has become the standard way to describe recurring schedules across software. A cron expression such as 0 9 * * 1-5 means "at 09:00 on Monday through Friday". The same syntax is used in crontab files, Kubernetes CronJobs, GitHub Actions, GitLab CI, AWS EventBridge, Google Cloud Scheduler, Azure Functions, Jenkins, and scheduling libraries in almost every language.
Cron is powerful but cryptic: it's easy to schedule a job for every minute when you meant once an hour, or to misunderstand how the day fields combine. This cron expression explainer translates the syntax into plain English and lists the exact upcoming run times, so you can be sure a job will run when you expect.
How to Use the Cron Explainer
- Paste or type a cron expression, or click one of the examples.
- Read the plain-English description of the schedule.
- Check the field breakdown to see exactly which minutes, hours, days and months match.
- Review the next run times in local time or UTC. Servers usually run cron in UTC.
Cron Syntax
| Field | Allowed values | Example |
|---|---|---|
| Minute | 0–59 | 30 = at minute 30 |
| Hour | 0–23 | 9-17 = 9am to 5pm |
| Day of month | 1–31 | 1,15 = 1st and 15th |
| Month | 1–12 or JAN–DEC | */3 = every 3 months |
| Day of week | 0–7 or SUN–SAT (0 and 7 = Sunday) | MON-FRI = weekdays |
Special characters: * means any value, , separates a list, - defines a range, and / sets a step (*/10 = every 10). Some systems add a seconds field at the start (6 fields). Quartz uses ? for "no specific value", which is treated here as *.
Common Cron Schedules
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour, on the hour (@hourly) |
0 0 * * * | Every day at midnight (@daily) |
0 9 * * 1-5 | 09:00 on weekdays |
0 0 * * 0 | Every Sunday at midnight (@weekly) |
0 0 1 * * | First day of every month (@monthly) |
0 0 1 1 * | Once a year on 1 January (@yearly) |
Cron Gotchas
- Day of month OR day of week: if both are restricted, standard cron runs when either matches, so
0 0 13 * FRIruns on every 13th and every Friday, not just Friday the 13th. - Time zones: most servers and cloud schedulers use UTC. Check which zone your platform uses, and remember daylight saving changes.
- Every minute by accident:
* 9 * * *runs 60 times between 09:00 and 09:59. You probably meant0 9 * * *. - Steps restart each hour or day:
*/45runs at minutes 0 and 45, not every 45 minutes continuously. - Impossible dates like 30 February never run.
Cron Across Platforms
- Linux crontab: 5 fields, edited with
crontab -e, runs in the server's local time zone unlessCRON_TZis set. - Kubernetes CronJob: 5 fields, with an optional
timeZonefield in the spec. - GitHub Actions: 5 fields in UTC. Scheduled runs can be delayed during busy periods.
- Quartz / Spring: 6 or 7 fields with seconds first, and
?for "no specific value". - AWS EventBridge: 6 fields including year, wrapped in
cron().
Testing a Schedule Before Deploying
Before adding a new job to a production crontab or CI pipeline, paste the expression here and read the next ten run times, in UTC if your server uses it. Check that the job runs as often as you expect, not every minute by accident, and that it avoids busy periods such as backups or peak traffic. For jobs that must not overlap, make sure the interval is longer than the job's maximum run time, or add a lock in the job itself.
Logging and Monitoring
Redirect each job's output to a log file, and add monitoring that alerts you when a scheduled job fails or doesn't run at all. Cron jobs fail silently far too often.
Frequently Asked Questions
What does */5 mean in cron?
Every 5 units of that field, for example minutes 0, 5, 10…55 in the minute field.
How do I run a cron job every day at a specific time?
Use minute hour * * *. For 6:30 pm, that's 30 18 * * *.
Is Sunday 0 or 7?
Both. Most cron implementations accept 0 and 7 as Sunday.
Does GitHub Actions use UTC?
Yes. GitHub Actions schedules are always interpreted in UTC.
What is @reboot?
A crontab macro that runs a job once when the system starts, rather than on a schedule.