Cron Explainer
Validate and explain schedules15 2 * * 1-5At minute 15, hour 2, day-of-month *, month *, day-of-week 1-5.
Educational defensive guidance. Review every result before production use.
Introduction
The Cron Explainer validates a standard five-field cron expression — minute, hour, day of month, month, day of week — and explains what it means in plain language.
Cron syntax is compact and easy to misread: 0 2 * * 1-5 and 0 2 * * 1,5 mean very different things. A second pair of eyes on the schedule prevents both missed jobs and 2 a.m. surprises.
Objective
- Validate that an expression has exactly five valid fields.
- Translate the fields into a readable sentence.
- Offer common presets as a starting point.
Inputs
- A five-field cron expression, for example 15 2 * * 1-5.
- Fields: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7, where 0 and 7 are Sunday).
How it works
The expression is split on whitespace. It must yield exactly five fields, and every field must consist only of digits and the operators * / , -.
The tool does not verify numeric ranges deeply (for example 99 as an hour still passes the character check) — the explanation is honest about the five-field structure.
A valid expression produces a sentence that reads each field literally; an invalid one produces a clear error message asking for exactly five fields.
Testable example
Try it — the analysis runs locally in your browser.
Example
Expression: 15 2 * * 1-5
Expected output
Valid. At minute 15, hour 2, day-of-month *, month *, day-of-week 1-5. Interpretation: weekdays at 02:15.
Reading the output
- If the explanation matches what you intended, the schedule is likely right.
- Watch for the classic trap: day-of-month and day-of-week are OR-combined in standard cron (Vixie), so an expression with both restricted can run more often than expected.
- Presets (hourly, daily, weekly, every 5 minutes) are safe starting points.
Risks
- A typo in the minute or hour field shifts a whole schedule — for example 30 2 * * * runs at 02:30, not 02:00.
- Using both day-of-month and day-of-week fields creates OR semantics that surprise most people.
- Jobs that run when the system is asleep or down are skipped or delayed depending on cron implementation — anacron and systemd timers behave differently.
Limitations
- The tool accepts the standard five-field format only; it does not parse Vixie extensions like @reboot or the six-field (seconds) variant.
- Range checking is shallow by design: 99 in the hour field passes the character check.
- It explains the expression; it cannot verify that the underlying command exists or has the right permissions.
Official references
FAQ
What does the day-of-week field accept?
0–7, where 0 and 7 are Sunday. Names like MON are not accepted by this validator — stick to numbers, ranges and lists.
Why is my job running more often than I expected?
If both day-of-month and day-of-week are restricted, Vixie cron runs the job when either matches. Use * in one of the two fields to get the intuitive AND behaviour.
Should I use cron or systemd timers?
For new work, systemd timers offer better logging, dependencies and missed-run handling. Cron remains fine for simple, well-understood schedules.