tooloora

Cron Expression Explainer — crontab in plain English

Paste a crontab line and read what it really does: field by field, with the next run times and the traps that bite in production.

Runs locally — nothing is uploaded

Examples

In plain words

At 03:00, every day.

Field by field

  • 0Minute

    at minute 0

    Matches: 0

  • 3Hour

    between 03:00 and 03:59

    Matches: 3

  • *Day of month

    on every day of the month

    Matches: 1, 2, 3, 4, 5, 6 … 31

  • *Month

    in every month

    Matches: Jan, Feb, Mar, Apr, May, Jun … Dec

  • *Day of week

    on every weekday

    Matches: Sun, Mon, Tue, Wed, Thu, Fri, Sat

Next runs

Calculating the next runs …

These times apply in the time zone configured on the server. Cron converts nothing; this preview uses your device clock.

The expression stays in your browser — it is never sent to a server.

Read cron expressions in plain English

Paste a crontab line and get a sentence that says what it does, every one of the five fields explained separately, and the next run times. The explainer understands stars, lists, ranges, step widths, the name tokens MON-FRI and JAN-DEC, and every shortcut from @hourly to @reboot. Your browser does the work; nothing is uploaded.

How do you read the five fields?

Left to right: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7), followed by the command. A star means “every value”. So 0 3 * * * reads as minute 0, hour 3, every day, every month, every weekday — daily at 3 a.m.

By far the most common typo is the swapped order at the front. People say “nine thirty”, but the minute comes first: 30 9 * * *. Writing 9 30 * * * does not produce an error message, it produces a job that never runs, because there is no hour 30 — stricter implementations reject the line outright.

What do the star, comma, hyphen and slash mean?

Four characters cover the entire syntax:

  • * — every value of the field.
  • 1,15 — a list of individual values.
  • 1-5 — a range, both ends included.
  • */5 — a step width across a range.

The step width is the one place with a real trap: it starts at the beginning of the range, not at zero. That is why 10-20/3 hits 10, 13, 16 and 19 rather than 12, 15 and 18. A step also restarts at the beginning of each field. */7 in the minute field fires at 0, 7, 14 … 56 — and then at 0 again, only four minutes later. Only divisors of 60 give an even rhythm across the hour boundary.

Why does the job run on more days than planned?

Because cron has two day fields and links them with OR as soon as both are restricted. The crontab(5) manual page puts it plainly: if both day of month and day of week are restricted, the command runs when either field matches.

So 0 0 13 * 5 means “on the 13th and on every Friday”, not “only on Friday the 13th” — around sixty runs a year instead of a handful. Friday the 13th cannot be expressed in cron at all; it needs a date check inside the script. Whenever this case applies, the explainer above points it out.

Which time zone does a cron job use?

The server's. Cron performs no time-zone conversion; it compares the fields against the machine's local clock. The same line therefore fires at a different moment on a server set to UTC than on one set to Berlin time. The preview in this tool necessarily uses your device clock — check the target system with timedatectl or date.

Daylight saving makes it uncomfortable: in spring an hour is skipped, in autumn an hour occurs twice. What happens to a job inside that hour depends on the implementation; Vixie-style cron catches up fixed-time jobs after the spring-forward jump. Do not rely on it. Running servers in UTC is the calmer answer, and a maintenance window at 4 a.m. instead of 2:30 a.m. avoids the question entirely.

Which shortcuts exist?

@hourly, @daily (same as @midnight), @weekly, @monthly, @yearly (same as @annually) and @reboot. All but the last are expanded into exactly five fields when the crontab is read: @daily is 0 0 * * *, @weekly is 0 0 * * 0, @monthly is 0 0 1 * *. @reboot has no schedule at all — the job runs once when the cron service starts.

There is no shortcut for intervals below an hour; every five minutes is written */5 * * * *. And classic cron cannot go finer than a minute, because there is no seconds field. Cron has been part of the standard Unix toolbox since Version 7 Unix (1979), and the variants common on Linux today go back to Paul Vixie's reimplementation from 1987 — the five fields have not changed since.

Why does my script work in the shell but not in cron?

Almost always the environment. Cron starts jobs with a very bare one: PATH is typically just /usr/bin:/bin, your login profile is never sourced, and HOME and the locale can differ from your interactive session. Three habits fix most cases:

  1. Use absolute paths for commands and for files.
  2. Redirect output, for example with >> /var/log/myjob.log 2>&1 — otherwise an error ends up in a local mail nobody reads.
  3. Escape the percent sign: in a crontab a bare % ends the command line and starts standard input. A date format like date +%Y-%m-%d has to be written as date +\%Y-\%m-\%d.

Private and offline-capable

Parsing the expression, describing it and computing the next run times all happen on your device. Nothing is transmitted, nothing is stored, and once the page has loaded it keeps working in airplane mode. Crontab lines regularly contain host names, absolute paths and tokens — none of which belong on someone else's server.

Frequently asked questions

What do the five fields in a cron expression mean?

In order: minute (0–59), hour (0–23), day of month (1–31), month (1–12) and day of week (0–7, where 0 and 7 both mean Sunday). A star means every value. The most common typo is swapping the first two, because people say “nine thirty” but cron wants the minute first: 30 9 * * *, not 9 30 * * *.

What does the slash in */5 mean?

It is a step width, not a division. The star stands for the full range, and /5 picks every fifth value from the start of that range: 0, 5, 10 and so on. On an explicit range the step starts at the range's beginning, so 10-20/3 hits 10, 13, 16 and 19 — not 12, 15 and 18.

Why does my job run on more days than I expected?

Because day of month and day of week are linked with OR, not AND, as soon as both are restricted. 0 0 13 * 5 runs on the 13th and on every Friday, not only on Friday the 13th. The crontab(5) manual page states this explicitly, and the explainer above flags the case whenever it applies.

Which time zone do the next run times use?

The preview uses your device clock, because everything is computed in your browser. Cron itself has no time-zone conversion at all: it reads the local clock of the server, so the same line fires at a different moment on a machine set to UTC than on one set to Berlin time. Check with timedatectl before you rely on it.

Is my crontab line sent to a server?

No. The parser, the description and the next run times all run inside your browser tab; nothing is uploaded, logged or stored, and the page keeps working offline. That matters because crontab lines regularly contain host names, absolute paths and tokens.