Cron expression parser
Explain a cron expression and show the next run times.
Next run times
You inherit a server and find 30 2 * * 6 sitting in the crontab. It runs something, but when? Cron syntax is compact enough that even people who write it regularly second-guess the field order.
Paste the expression here and you get two things back: a sentence describing the schedule, and the next five times it would actually fire. The example buttons above the input load a few common patterns if you want to see the shape first.
How it works
The five fields
Cron reads five space-separated fields, always in this order.
| Position | Field | Range |
|---|---|---|
| 1 | Minute | 0–59 |
| 2 | Hour | 0–23 |
| 3 | Day of month | 1–31 |
| 4 | Month | 1–12 |
| 5 | Day of week | 0–6 (0 = Sunday) |
So 30 2 1 * * is 02:30 on the 1st of every month.
Operators
*— every value in the range,— a list, e.g.0,30-— a range, e.g.1-5/— a step, e.g.*/15(every 15th unit) or10-50/10
These combine: 0 9 * * 1-5 is 9:00 AM on weekdays.
Reading the results
The summary line restates the expression in words. Below it, the tool walks forward minute by minute — up to about a year — and lists the next five matches. Those times use your browser's local time zone, which is often not the server's; a box in UTC will fire at different wall-clock times than what you see here.
What this parser does not accept
Numbers only. Month and weekday names (JAN, MON), shortcuts (@daily, @reboot), and the ?, L, W, # characters used by Quartz and Spring are not parsed, and neither are six-field expressions that start with seconds. One behavioural difference worth knowing: when both day-of-month and day-of-week are restricted, this tool requires both to match, while standard Unix cron (Vixie cron) fires when either matches. For that specific case, check your scheduler's own documentation before relying on the preview.
Terms explained
- Field
- One of the five space-separated slots in an expression. Missing or extra fields produce an error, since all five are required.
- Step (`/`)
- Repeats at an interval within a range. `*/15` in the minute field means minutes 0, 15, 30 and 45.
- Range (`-`)
- An inclusive span. `1-5` in the weekday field means Monday through Friday.
- Day of week
- Numbered 0–6 with Sunday as 0. This parser does not accept 7 as an alias for Sunday, nor three-letter names.
- Next run times
- Five upcoming matches, computed by scanning forward from the current minute in your browser's local time zone.
Frequently asked questions
What does */15 * * * * mean?
It runs every 15 minutes, all day, every day — at minute 0, 15, 30 and 45 of each hour. The `*/15` is a step in the minute field, and the four asterisks after it place no restriction on hour, day, month or weekday.
Why do the next run times not match my server?
The preview uses your browser's local time zone, while a cron daemon uses the server's configured time zone, which is frequently UTC. Compare the offsets before assuming the schedule is wrong. Daylight-saving transitions are another source of drift on servers set to a local zone.
Does it support @daily, seconds, or names like MON?
No. This parser handles the classic five numeric fields only. Six-field expressions with a leading seconds field (Quartz, Spring's `@Scheduled`) and shortcut macros such as `@daily` or `@hourly` will be rejected, so convert them to the five-field form first.
Why does my expression show no upcoming runs?
Some expressions are valid in syntax but impossible in practice, such as `0 0 30 2 *` — February never has a 30th. The tool scans about a year ahead and reports when it finds nothing, which usually points to a day-and-month combination that cannot occur.
Is my expression sent to a server?
No. The parsing and the date arithmetic both happen in your browser with JavaScript, so nothing you type leaves the page.
Tell us what went wrong and we'll fix it fast. (Leave an email if you'd like a reply.)