oktools

Cron Expression Parser

Paste a cron expression — or a whole line out of a crontab — and read your cron schedule back in plain English, with the next times the cron job fires. Each column is labelled, so you never have to remember which one is the day of the week, and the field editor doubles as a crontab generator: fill in the boxes and copy the expression out. Nothing leaves your browser.

0-59
0-23
1-31
1-12 or JAN-DEC
0-6 or SUN-SAT
Start from:

In plain English

At 09:00 on Monday through Friday.

Next runs

1Times a day it runs
—Times a year

Reading your clock

The next runs are worked out in your browser, against your own time.

How it works

Whatever lands in the expression line is unwrapped before it is read: a leading #, a schedule: or cron: key with its YAML dash, quotes and a trailing comma. The rest is split on whitespace. @reboot is recognised on its own and the other nicknames are expanded to their five fields; otherwise tokens are counted while they look like fields — digits, * and ?, ranges, steps, month and weekday names — up to six. Five or more make a schedule and the remaining tokens are set aside as the command; fewer are a half-typed expression and stay in the boxes they belong to. Six fields switch the seconds column on.

Each field is split on commas, then on the dash and the slash. Names are accepted as JAN or January, in any case, but only as the three-letter form or the whole word. Day-of-week 7 is folded onto Sunday, 5/20 means from 5 to the end of the range in steps of 20, and a backwards range is refused with the split it has to be written as, because cron ranges never wrap. L, W and # are rejected as Quartz extensions. Whether both day columns are restricted is read from the text, as Vixie cron reads it: a field that starts with * or ? is unrestricted, and anything else makes the two columns an either/or.

The sentence is built from the expanded values: one minute and one hour read as a clock time, a few combinations are listed in full, and anything wider becomes clauses, with the day clauses joined by “or” when either column can fire the job and by “and” when both must hold. Next runs are found by stepping a calendar cursor forward from now, in your zone or in UTC, skipping months, days and hours that cannot match, for up to ten years; 30 February comes back empty and is reported as never running. The stats bar multiplies the second, minute and hour values together, then by the matching days in the next 365.

Examples

Read a crontab line in plain English

The schedule is the first five tokens; the command is set aside and shown, not parsed. The same line pasted with a leading # reads identically, which is how to check a job before uncommenting it.

Crontab line
30 2 1,15 * * /usr/local/bin/backup.sh --full
Reads as
At 02:30 on the 1st and 15th of every month.

Read the first 5 fields as the schedule. The rest of the line — /usr/local/bin/backup.sh --full — is the command cron runs.

Catch the day-of-month and day-of-week trap

The “or” is deliberate: both day columns are restricted, so cron fires when either one matches, and a notice under the sentence explains that leaving one of them as * turns it into an “and”.

Expression
0 0 1 * 1
Reads as
At 00:00 on the 1st of every month, or on Monday.

Decode a six-field Quartz or Spring expression

Six fields are read with seconds first and the Seconds field toggle switches itself on. The stats bar puts this at 36 runs a day: four an hour across the nine hours from 09:00 to 17:59.

Expression
0 */15 9-17 * * 1-5
Reads as
Every 15 minutes, between 09:00 and 17:59, on Monday through Friday.

Get told what is wrong, and how to write it

The box holding the fault is marked and the sentence is withheld until the expression parses. An out-of-range number, a step of zero, a stray comma and Quartz’s L, W and # each get a message of their own.

Expression
0 22-2 * * *
Error
Range "22-2" runs backwards. Cron ranges never wrap around, so write 22-23,0-2 instead.

Supported formats

  • Five fields, or six with secondsMinute, hour, day of month, month and day of week, as crontab(5), cronie, Kubernetes CronJobs and GitHub Actions write them; or the same five with a seconds column in front, as Quartz and Spring’s @Scheduled do.
  • Every standard field form* and ? for any value, a single number, a-b ranges, a,b,c lists, */n and a-b/n steps and a/n for “from a to the end of the range”. Months as 1-12 or JAN-DEC, weekdays as 0-6 or SUN-SAT, full names too, in any case, with 7 accepted for Sunday.
  • The nicknames@yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly are expanded to the fields they stand for, and @reboot is described as a start-up job with no run times.
  • Lines with their wrapping still onA crontab line with its command, a line commented out with #, schedule: "…" from a CronJob manifest, the quoted cron: entry of a workflow file and "schedule": "…", from JSON all read as the bare expression would.

Use cases

  • Check a line before saving crontab -ePaste the whole line, command and all, and read the sentence and the next ten runs. A job that was meant for a quarter past nine and was written as 9 15 shows up at 15:09 straight away.
  • Translate a Kubernetes or GitHub Actions scheduleBoth run their cron in UTC. Paste the schedule: line from the manifest or workflow, switch the run list to UTC, and compare it with your own zone to see when the job really lands in your day.
  • Explain a job that runs on extra daysWhen day of month and day of week are both set, the sentence reads “or” and the notice spells out the rule. That is usually the whole answer to why a monthly report also arrived on a Monday.
  • Build an expression from scratchStart from a preset or a cheat-sheet recipe, edit the labelled boxes — Space moves to the next one, as in a crontab — and copy the expression out once the sentence says what you meant.

Limitations

  • Standard cron onlyQuartz’s L, W and # and its optional year field are rejected with an explanation. AWS EventBridge expressions end in a year, which a six-field reading takes for a day of week — 0 12 * * ? 2025 fails on 2025 — so drop the year and read the five fields.
  • Two zones: yours and UTCCRON_TZ and TZ lines are not read, and there is no other zone to pick. For a job that runs on a server in a third zone, work out the offset with the Timezone Converter.
  • Daylight-saving days may differ from your daemonThe run list uses JavaScript’s own calendar for local time. On the two days a year the clock jumps, cronie and systemd timers each have their own rule for a skipped or repeated hour, and the list here may be an hour out on those days.
  • Nothing cron itself cannot say“The last Friday of the month” or “every 90 minutes” have no standard cron spelling. The usual answer is a more frequent schedule with the check inside the script, or a scheduler with its own syntax.

Frequently asked questions

What do the five fields in a cron expression mean?

In order: minute, hour, day of month, month and day of week. So 30 2 * * 1 is 02:30 every Monday. Each column is labelled as you type here, which removes the usual guessing about which position holds the day of the week. A six-field expression is read with seconds in front, as Quartz and several schedulers write it.

What does */5 mean in cron?

Every fifth value of that field, counting from its lowest. In the minute field */5 fires at :00, :05, :10 and so on through :55 — twelve times an hour, not once every five hours. The step applies only to the field it is written in, so */5 in the hour column with 0 in the minute column means 00:00, 05:00, 10:00 and so on.

How do I schedule a job for a specific time every day?

Put the minute and hour you want in the first two fields and leave the rest as asterisks: 15 9 * * * runs at 09:15 every day. Paste it here and the next run times are listed, which is the quickest way to confirm you have not written 9 15 * * * and scheduled it for a quarter past three in the afternoon.

Which time zone are the next run times in?

You choose — the schedule can be shown in your local zone or in UTC, and both are computed from the same fields. Real cron daemons use the system zone unless a CRON_TZ or TZ setting says otherwise, and a container almost always runs in UTC, which is the usual reason a job fires an unexpected number of hours out.

Why does my job run more often than expected when I set both a day of month and a day of week?

Because cron treats those two fields as an OR, not an AND, whenever both are restricted. 0 0 1 * 1 runs on the first of the month and on every Monday, not only on a first that falls on a Monday. Vixie cron and cronie decide by the text: a field that starts with an asterisk, including a step such as */2, does not count as restricted, so 0 0 */2 * 1-5 is an AND and runs only on weekdays that are odd-numbered days. It is the most misread rule in crontab, so the explanation here calls it out whenever your expression triggers it.

Does it understand @daily, @hourly and the other nicknames?

Yes. @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly are expanded to the fields they stand for and then explained normally, so you can see exactly what time of day @daily means before you rely on it. @reboot is recognised too, but it has no fields behind it: cron runs the command once when the daemon starts, so it is described as such and no run times are listed.

Can I paste a whole line from my crontab?

Yes. The schedule is told apart from the command that follows it, so you can copy a line straight out of a crontab without trimming it first, and the command is shown separately from the schedule it runs on. A line out of a Kubernetes CronJob manifest or a GitHub Actions workflow works too: a schedule: or cron: key in front and the quotes around the expression are stripped before it is read.