Cron Expression Generator
Build a cron expression from plain fields, or paste one to see what it means in English and when it next runs.
Runs entirely in your browser. Your input is never sent to our servers.
At 03:30.
- Minute
- 30
- Hour
- 3
- Day of month
- * (every)
- Month
- * (every)
- Day of week
- * (every)
- Expression
- 30 3 * * *
TZ, not UTC and not the viewer’s locale. A job scheduled for 02:30 will run twice, or not at all, on the days daylight saving shifts — which is why maintenance windows are usually placed outside 01:00–03:00.What is Cron Expression?
A cron expression is a five-field schedule — minute, hour, day of month, month and day of week — that tells the cron daemon when to run a command, with each field accepting a value, a list, a range, a step or an asterisk meaning every value.
What this Cron Expression Generator does
Paste an expression and this tool validates every field, describes the schedule in plain English, and flags the two behaviours that surprise people most: the relationship between the two day fields, and the timezone the schedule is interpreted in.
It also works the other way. Pick one of the presets to get a correct expression for a common schedule, then adjust it and watch the description change as you type.
How to use it
- Paste an expression, or start from a preset.
- Read the English description to confirm it means what you intended.
- Check the per-field breakdown if a field is not doing what you expect.
- Copy the expression into your crontab.
Understanding your results
Field order is minute, hour, day of month, month, day of week. Hour before minute is the most common transposition, and it produces a schedule that is valid and wrong.
*/n means every n steps from the start of the range, not every n occurrences. */15 in the minute field fires at :00, :15, :30 and :45.
Day of week accepts 0–7, with both 0 and 7 meaning Sunday.
Why this matters
The day fields are combined with OR, not AND. If both day of month and day of week are set to anything other than *, the job runs when either matches. So 0 0 1 * 1 does not mean “the first of the month, if it is a Monday” — it means the first of every month and every Monday. Cron cannot express the intersection; that has to be a guard inside the script.
Timezone is the other trap. Cron uses the system timezone or the crontab’s TZ, not UTC. On the days daylight saving shifts, a job scheduled inside the affected hour runs twice or not at all — which is why maintenance windows are conventionally placed outside it.
Common mistakes
Setting both day fields and expecting AND. The most consequential misunderstanding in cron, because the job appears to work and simply runs more often than intended.
Writing six fields. Seconds-precision cron exists in Quartz and some schedulers but is not standard crontab; the extra field shifts every other field along.
Assuming the job inherits your shell environment. Cron runs with a minimal environment and a short PATH, which is why a script that works interactively fails under cron.
Scheduling everything at midnight. Jobs pile up at 0 0 * * *, competing for the same disk and network. Spreading them costs nothing.
Limitations
Standard five-field cron only. Extensions such as @reboot, @daily, L and #, and the seconds field used by Quartz, are not covered because they are not portable across implementations.
It describes what an expression means, not when it will next fire on your system — that depends on the daemon’s timezone and clock, which this tool cannot see.
Frequently asked questions
What do the five fields mean, in order?
Minute (0–59), hour (0–23), day of month (1–31), month (1–12) and day of week (0–7, where both 0 and 7 are Sunday). The command follows them.
Why does my job run more often than I expect?
Most likely you set both day of month and day of week. Cron treats them as OR, so the job fires whenever either matches rather than only when both do.
What does */5 actually mean?
Every fifth value across the field’s range, starting at its beginning. In the minute field that is :00, :05, :10 and so on — not five minutes after whenever the job last ran.
Which timezone does cron use?
The system timezone, or the value of TZ set in the crontab where that is supported. Not UTC, and not the timezone of whoever wrote the entry.
Why does my script work manually but fail under cron?
Cron provides a minimal environment with a short PATH and none of your shell profile. Use absolute paths, or set PATH explicitly at the top of the crontab.
References
Last reviewed