What is a cron expression?
A cron expression is five space-separated fields that tell the Unix scheduler cron when to run a job: minute hour day-of-month month day-of-week. Every minute, cron wakes up, compares the current time with every line of the crontab, and starts the commands whose five fields all match. The expression 0 9 * * 1-5 means minute 0, hour 9, every day of the month, every month, Monday to Friday — 09:00 on weekdays.
The five fields, in order, are:
| Field | Allowed values | Names | Meaning |
|---|---|---|---|
| Minute | 0–59 | — | Minute of the hour |
| Hour | 0–23 | — | Hour of the day, 24-hour clock (18 is 6 p.m.) |
| Day of month | 1–31 | — | Day of the month |
| Month | 1–12 | JAN–DEC | Month of the year |
| Day of week | 0–7 | SUN–SAT | Weekday, where 0 and 7 are both Sunday |
Four operators unlock almost every schedule you will ever need. An asterisk * means every value. A step like */5 means every 5th value, so */15 in the minute field fires at minutes 0, 15, 30 and 45. A range a-b covers a contiguous span, so 1-5 in the day-of-week field means Monday through Friday. A comma list a,b,c picks specific values, so 0,30 in the minute field runs on the hour and the half hour. A step can also follow a range: 10-20/2 fires at 10, 12, 14, 16, 18 and 20.
How to use this tool
- Paste a cron expression into the box — or click one of the common schedules to load it. Shortcuts like
@dailywork too, and you can paste a whole crontab line; the command after the five fields is ignored. The explanation updates as you type. - Read the plain-English sentence. The schedule becomes one sentence, for example “Every 15 minutes, between 09:00 and 17:59, on weekdays.” Below it, a table explains each of the five fields next to its raw value, so you can spot the field where you slipped a digit.
- Check the next five runs. The upcoming run times are listed in your local time or in UTC, with how long until each one. If the schedule can never run — 31 February, for example — the tool says so instead of showing an empty list.
- Or build one by pointing and clicking. Pick how often the job should run in the builder — every N minutes, daily, weekly, monthly — set the time and the day, and the expression is generated for you.
- Copy it. Copy the expression itself, or the whole schedule summary — sentence, expression and next runs — as plain text.
If the expression is wrong, the error names the field and the reason — “Hour: 30 is out of range (0–23)” — instead of a bare “invalid expression”.
The day-of-month vs day-of-week trap
One rule surprises almost everyone. When both the day-of-month field and the day-of-week field are restricted — neither one is a bare * — cron treats them as an OR, not an AND. The expression 0 0 13 * 5 does not mean “Fridays that fall on the 13th”. It means the 13th of the month and every Friday, so the job runs about five times a month instead of once or twice a year. This tool flags the trap whenever both day fields are set, and the next-run list makes it obvious: you will see the 13th and the Fridays both in the list.
When only one of the two day fields is restricted, only that one counts. When both are *, the job runs every day. A field counts as restricted here when it is anything other than a bare *, including */1 — that matches the POSIX wording (“if both fields are restricted, that is, are not *”). A few schedulers differ in edge cases, so when the two day fields matter, verify with the next-run list rather than with memory.
Common schedules
| Expression | Runs |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes (the shortest interval GitHub Actions allows) |
0 * * * * | Every hour, on the hour (same as @hourly) |
0 */6 * * * | Every 6 hours, at 00:00, 06:00, 12:00 and 18:00 |
0 0 * * * | Daily at midnight (same as @daily) |
30 2 * * * | Daily at 02:30 — 02:30 does not exist on the spring daylight-saving day |
0 9 * * 1-5 | Weekdays at 09:00 |
0 0 1 * * | The 1st of every month at midnight (same as @monthly) |
0 0 * * 0 | Sundays at midnight (same as @weekly) |
0 0 1 1 * | 1 January at midnight (same as @yearly) |
0 0 1 */3 * | The 1st of January, April, July and October — every quarter |
Shortcuts: @daily and friends
Cron understands a handful of shortcuts that stand in for a full expression. This tool expands them so you can see what they really mean:
| Shortcut | Means | Same as |
|---|---|---|
@hourly | Once an hour, on the hour | 0 * * * * |
@daily / @midnight | Once a day, at midnight | 0 0 * * * |
@weekly | Once a week, Sunday at midnight | 0 0 * * 0 |
@monthly | Once a month, the 1st at midnight | 0 0 1 * * |
@yearly / @annually | Once a year, 1 January at midnight | 0 0 1 1 * |
One shortcut is not a schedule: @reboot runs once when the machine starts, so there is no “next run” to list.
Quartz, seconds and L, W, # — what this tool does not do
Not every “cron” is the same cron. Quartz and Spring add a leading seconds field, making six fields, and Quartz adds the characters L (last day), W (nearest weekday), # (nth weekday of the month) and ? (no specific value). A six-field expression pasted into a five-field crontab shifts every field by one, so a job you meant to run hourly runs at a completely different time. This tool reads classic five-field Unix crontab only: paste a Quartz expression and it names the field and the character that is wrong, and for a six-field expression it shows the five-field version to use.
The same honesty applies to impossible dates. A schedule for 31 February (0 0 31 2 *) can never run, and one for 29 February only runs in leap years. The next-run search walks forward up to five years, so a leap-day schedule is still found, and a schedule with no run in five years is reported as never running.
Timezones and daylight saving
A cron expression itself has no timezone. The server interprets it in its own local time — which is often UTC, but is whatever the machine’s clock says. The next runs on this page are shown in your browser’s local time by default, with a UTC toggle, so you can check the schedule against the clock your scheduler actually uses.
Daylight saving is the sharp edge. On the spring change day an hour of wall-clock time never happens — in much of Europe and North America, 02:00 to 02:59 is skipped — so a job scheduled at 02:30 simply does not run that day. On the autumn change day an hour happens twice, so a job scheduled inside it can run twice, and schedulers disagree about both cases. The practical rule is simple: never schedule a job between 02:00 and 03:00 if you can avoid it.
Common mistakes to avoid
- Both day fields set, meaning AND. Cron uses OR.
0 0 1 * 1runs on the 1st of the month and on every Monday, not only on Mondays that fall on the 1st. - Six fields in a five-field crontab. Quartz puts seconds first. Pasting
0 30 9 * * *into crontab means minute 0, hour 30 — which is invalid — not 09:30 with a seconds field. - 0 and 7 are both Sunday.
0-6and1-7both cover the whole week. Writing7for Saturday is a classic off-by-one: Saturday is 6. - Steps start at the first value, not at 1.
*/5in the minute field fires at 0, 5, 10 and so on — not at 5, 10, 15. To start at 5, write5/5or5-59/5. - A range that never matches.
0 0 31 2 *(31 February) never runs, and neither does0 0 31 4 *— April has 30 days. Cron skips the date silently; the next-run list is where you catch it. - Forgetting the timezone. A job set for 02:00 runs at 02:00 wherever the server thinks it is. A schedule copied from a tutorial written in another timezone fires at the wrong hour on your machine.
Worked example: the backup that ran twice as often as planned
A team set a backup to run on the 1st of the month and on Mondays, writing 0 2 1 * 1 and reading it as “Mondays that fall on the 1st”. The backup actually ran on the 1st and on every Monday — roughly five times a month — and nobody noticed until the storage bill arrived. Paste it into this tool and the sentence reads “At 02:00, on the 1st and on Mondays”, with the OR warning underneath and both dates in the next-run list. Mondays only is 0 2 * * 1, the 1st only is 0 2 1 * *, and “a Monday that is the 1st” cannot be expressed in a single cron line at all — it needs the job itself to check the date.
Frequently asked questions
- What is a cron expression, in one sentence?
- Five space-separated fields — minute, hour, day of month, month, day of week — that tell the Unix scheduler cron exactly when to run a job. For example, 0 9 * * 1-5 means 09:00, Monday to Friday.
- What do the five fields mean?
- Minute (0–59), hour (0–23), day of month (1–31), month (1–12, or JAN–DEC) and day of week (0–7, or SUN–SAT, where 0 and 7 are both Sunday). Each field accepts a number, a list (1,15), a range (9-17), a step (*/5) or * for “every”.
- Why does my job run on days I did not expect?
- Almost always the day-of-month versus day-of-week rule: when both day fields are restricted, cron runs the job when either one matches, not only when both do. So 0 0 13 * 5 runs on the 13th of the month and on every Friday.
- What is the difference between 0 and 7 in the day-of-week field?
- Nothing — both mean Sunday. The field runs 0–7 so that Sunday can be written at either end of the week: 0-6 and 1-7 both cover the whole week, and 0,6 and 6,0 both mean Saturday and Sunday.
- Does this tool support Quartz, seconds, L, W or #?
- No — deliberately. This tool reads classic 5-field Unix crontab only. Quartz adds a seconds field and the characters L, W, # and ?, which mean different things in different schedulers. If you paste one, the tool names the field and the character instead of silently misreading it.
- What timezone are the next run times in?
- Your browser’s local time by default, with a UTC toggle. A cron expression itself has no timezone — the server runs the job in its own local time, which is often UTC.
- What does */5 mean?
- Every 5th value, starting at the first value of the field. In the minute field, */5 fires at minutes 0, 15, 30 and 45. A step can also follow a range: 10-20/2 fires at 10, 12, 14, 16, 18 and 20.
- Can I use this offline?
- Yes. Parsing, the description and all date math happen in your browser. Load the page once and it keeps working without a connection, and nothing you type is sent anywhere.
Privacy
Cron expressions are parsed locally in your browser. Nothing is sent to a server, logged, or stored.
Share this tool
Copy the link below and paste it anywhere — a chat message, an email, a document. Whoever opens it gets the same free tool, with no account and nothing to install.