CRON PARSER

Cron Parser

Parse a Unix cron expression — validate it, see what each field means, and preview the next run times.

Type a five-field Unix cron expression — parsing runs live. Names (JAN, MON), ranges, lists, steps, and @shortcuts all work.

how cron works

What cron is

cron is the scheduler daemon on Unix-like systems. It wakes once a minute, checks every installed crontab (cron table), and runs whatever matches the current time. Edit your own table with crontab -e, list it with crontab -l. System-wide jobs live in /etc/crontab and /etc/cron.d/ (those files have an extra user column between the schedule and the command).

The five fields

┌──────── minute        (0-59)
│ ┌────── hour          (0-23)
│ │ ┌──── day of month  (1-31)
│ │ │ ┌── month         (1-12 or JAN-DEC)
│ │ │ │ ┌ weekday       (0-7 or SUN-SAT; 0 and 7 are both Sunday)
│ │ │ │ │
* * * * *  command

Syntax

formexamplemeaning
** * * * *every value — runs every minute
value30 3 * * *exactly that value — 03:30 daily
list0 8,12,17 * * *any of the listed values
range0 9-17 * * *every value in the range, inclusive
step*/15 * * * *every Nth value — here, every 15 minutes
combined0-30/10 9 * * 1-5steps over ranges, lists of anything

Shortcuts: @hourly, @daily/@midnight, @weekly, @monthly, @yearly/@annually expand to plain five-field schedules; @reboot runs once at startup.

The day-of-month / weekday quirk

When both day-of-month and weekday are restricted, cron runs when either matches — not both. 0 0 13 * 5 fires every Friday and every 13th, not just Friday the 13th. This surprises almost everyone; there is no standard way to get the AND behavior without a shell test in the command itself.

Gotchas worth knowing

  • Timezone — cron uses the server's local time. A 09:00 job on a UTC server is not 09:00 your time.
  • Environment — cron jobs get a minimal environment: no login shell, a bare PATH. Use absolute paths for commands and files, or the job that "works when I run it manually" will fail silently at 3 a.m.
  • Output — stdout/stderr get mailed to the local user (usually nowhere useful). Redirect it: >> /var/log/myjob.log 2>&1.
  • Missed runs — plain cron skips runs while the machine is off. If a job must catch up, look at anacron or systemd timers with Persistent=true.
  • The % sign — in a crontab command, % means newline; escape it as \% (a classic date +\%F trap).