Cron is the classic Unix job scheduler, and its schedule syntax has spread far beyond it: CI pipelines, cloud schedulers, and job queues all accept cron expressions. The syntax is compact, which makes it easy to get subtly wrong. Here is how to read and write it with confidence.
The five fields
A standard cron expression has five space-separated fields. Read left to right, they say when a job should run:
minute hour day-of-month month day-of-week
0-59 0-23 1-31 1-12 0-6 (Sunday = 0)
* * * * *A job runs when the current time matches every field. A * means "every possible value" for that field.
The special characters
- * matches every value in the field.
- , separates a list: 1,15 means the 1st and the 15th.
- - defines a range: 1-5 means 1 through 5 (Monday to Friday in the day-of-week field).
- / defines a step: */15 means every 15 units, and 10-40/10 means 10, 20, 30, 40.
Common schedules
- */5 * * * * runs every 5 minutes.
- 0 * * * * runs at the top of every hour.
- 0 9 * * 1-5 runs at 09:00 on weekdays.
- 30 2 * * 0 runs at 02:30 every Sunday.
- 0 0 1 * * runs at midnight on the first of every month.
- 0 0 1 1 * runs once a year, at midnight on 1 January.
- 15 14 1 * * runs at 14:15 on the 1st of each month.
The gotchas that cause missed jobs
Time zones
Cron runs in the time zone of the machine or service, which is very often UTC. A job you wrote as "9 AM" may fire at 9 AM UTC, not in your local time. Cloud schedulers usually let you set a time zone explicitly; check before you assume.
Day of month plus day of week
In classic Vixie cron, if you restrict both the day-of-month and the day-of-week fields, the job runs when either one matches, not both. 0 0 13 * 5 fires on every 13th and on every Friday, not only on Friday the 13th. Other schedulers may behave differently, so read their docs.
Dialect differences
- Some systems (Quartz, Spring, AWS EventBridge) add a seconds or year field, so expressions have six or seven fields.
- Some support names such as MON or JAN and shortcuts like @daily or @hourly; others do not.
- Characters like L, W, and # (last day, nearest weekday, nth weekday) exist in some dialects only.
Daylight saving time
In a local time zone that observes daylight saving, a job scheduled during the skipped hour may not run, and one in the repeated hour may run twice. Scheduling in UTC avoids the problem entirely.
Frequently asked questions
+What does */5 * * * * mean in cron?
It means run every 5 minutes: the */5 in the minute field is a step of 5, and the other fields are wildcards.
+How do I run a cron job every day at midnight?
Use 0 0 * * *. That is minute 0, hour 0, every day of the month, every month, every day of the week.
+Does cron use UTC or local time?
It uses the time zone of the machine or scheduling service running it. Many servers and cloud schedulers default to UTC, so confirm and set the time zone explicitly when it matters.
+What is the difference between 5-field and 6-field cron?
Standard Unix cron has five fields (minute to day of week). Some schedulers add a leading seconds field, or a trailing year field, so always check which format your tool expects.
Cron Expression Parser
Free, runs in your browser — nothing you enter is uploaded.