Cron expression explainer

Explain Vixie crontab(5) five-field expressions in your browser. Minute, hour, day-of-month, month, day-of-week. Not Quartz.

Docify's cron explainer reads a crontab(5) five-field expression (minute hour day-of-month month day-of-week) in your browser. The dialect is Vixie cron as documented for Debian cron 3.0pl1: *, lists, numeric ranges, steps after * or a-b, one three-letter month or weekday name, and the @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly nicknames. @reboot is rejected. For example, 30 4 1,15 * 5 produces At 04:30, 1, 15 of every month (1–12), and also 5 (Friday). 30 4 1,15 * fri produces the same summary. Click Explain to parse. Not Quartz, not Jenkins, not a next-run calculator. Nothing is uploaded.

Expression
Explanation

How it works

  1. Enter a five-field expression and click Explain to parse it. For example, 30 4 1,15 * 5 (the crontab(5) OR example) produces At 04:30, 1, 15 of every month (1–12), and also 5 (Friday). 30 4 1,15 * fri produces the same summary. Copy writes the explanation. Nothing is uploaded.
  2. A line is five whitespace-separated fields: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7; 0 and 7 are Sunday). * is first–last. A list is comma-separated numbers or ranges. A range is a-b with a ≤ b. A step is */n or a-b/n only. Month and weekday accept one three-letter English name (jan… dec, sun… sat); lists or ranges of names are rejected.
  3. @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly expand to the Vixie nicknames before the same parse. @reboot is rejected (startup, not a schedule).
  4. If both day fields are restricted (neither begins with *), the days are OR-ed. The same expression demonstrates crontab(5) union: At 04:30, 1, 15 of every month (1–12), and also 5 (Friday). If a day field begins with *, both must match (AND). Debian crontab(5) uses the first character, so */2 is star-like. Rejected: seconds or year fields, Quartz ? / L / W / # (so 0 30 4 1,15 * ? fails on ?), Jenkins H, cronie ~, a username or command, month 0, and day-of-month 0. No next-run times.

Vixie crontab vs Quartz

This page explains Vixie crontab(5) five-field expressions as shipped by Debian cron 3.0pl1 (Paul Vixie). Click Explain to parse minute, hour, day-of-month, month, and day-of-week. It is not Quartz CronTrigger — six mandatory fields plus an optional year, with seconds first. Node and CPython have no stdlib cron explainer. For the longer comparison, see Vixie Crontab vs Quartz: 5-Field vs 6/7.

AspectThis page (Vixie)Quartz 2.3
FieldsFive: min hr dom mon dowSix plus optional year: sec min hr dom mon dow [year]
Seconds / yearNoneSeconds first; year 1970–2099 optional
Sunday0 and 71 (SUN–SAT; 7 is Saturday)
Day fieldsRestricted fields are OR-ed; */2 is star-like (AND)One day field must be ?
SpecialsRejected: ? L W #, Jenkins H, cronie ~? L W # on the day fields
Nicknames@yearly @annually @monthly @weekly @daily @midnight @hourly; @reboot rejectedNo Vixie nicknames

30 4 1,15 * 5 explains to At 04:30, 1, 15 of every month (1–12), and also 5 (Friday). 30 4 1,15 * fri is that same summary. Quartz 0 30 4 1,15 * ? is rejected because ?. 0 30 4 1,15 * 6 is six fields here (and invalid Quartz without ?; 6 is Friday when Sunday is 1). Month 0 and day-of-month 0 are rejected. This page does not compute the next fire time and has no timezone or DST table. For epoch seconds, see Unix timestamp converter.

Vixie crontab vs systemd OnCalendar

This page explains Vixie crontab(5) five-field expressions. It is not systemd OnCalendar= from systemd.time. Confirmed here with systemd 255.4 systemd-analyze calendar. Node and CPython have no stdlib cron or calendar explainer. A Vixie line is not a calendar spec: 30 4 1,15 * 5 fails with Invalid argument. For Quartz six-field syntax, see the table above and Vixie Crontab vs Quartz: 5-Field vs 6/7.

AspectThis page (Vixie)systemd OnCalendar
FormatFive: min hr dom mon dowDow YYYY-MM-DD HH:MM:SS
SecondsNone (six fields are rejected)Present; omitted seconds become :00
Weekday0 and 7 are Sunday; 5 is Friday; one name friEnglish names only (Fri, Sun). Numeric 5 *-*-* 04:30:00 is Invalid argument
Day fieldsRestricted day-of-month and day-of-week are OR-edOne spec ANDs weekday and date. Fri *-*-01,15 04:30:00 is Fridays that are also the 1st or 15th
Matching the sample30 4 1,15 * 5 is one lineTwo units: *-*-01,15 04:30:00 and Fri *-*-* 04:30:00
Nicknames@weekly is Sunday midnight; @reboot is rejectedweekly is Monday midnight; reboot is OnBootSec=, not a calendar event

systemd-analyze calendar (Linux)

systemd 255.4 systemd-analyze calendar parses a calendar event, not a Vixie line. It prints a normalized form and a next elapse. This page does not compute the next fire time:

# 04:30 on the 1st and 15th (one Vixie OR leg)
systemd-analyze calendar '*-*-01,15 04:30:00'
# Normalized form: *-*-01,15 04:30:00

# 04:30 every Friday (the other OR leg)
systemd-analyze calendar 'Fri *-*-* 04:30:00'
# Normalized form: Fri *-*-* 04:30:00

# One spec ANDs weekday and date — 1 January 2027 is a Friday
systemd-analyze calendar 'Fri *-*-01,15 04:30:00'
# Normalized form: Fri *-*-01,15 04:30:00

# Five Vixie fields are not a calendar event
systemd-analyze calendar '30 4 1,15 * 5'
# Failed to parse calendar specification '30 4 1,15 * 5': Invalid argument

*-*-* 04:30 normalizes to *-*-* 04:30:00. fri normalizes to Fri. hourly is *-*-* *:00:00 (same wall time as @hourly). daily is *-*-* 00:00:00 (same as @daily / @midnight). monthly is *-*-01 00:00:00 (same as @monthly). yearly is *-01-01 00:00:00 (same as @yearly). weekly is Mon *-*-* 00:00:00; Vixie @weekly is 0 0 * * 0 (Sunday). systemd ~ is last-day-of-month (*-*~01 is 31 October 2026 in October); this page rejects ~ as cronie randomization. Mon..Fri *-*-* 09:00:00 is a weekday range; this page rejects ranges of names. macOS and Windows have no systemd-analyze unless you use a Linux VM. Quartz ? / L / W / # stay rejected here. This page does not read unit files and has no Persistent= or timezone table.

FAQ

Does this explainer upload anything?
No. Explain and copy run in your browser. The page does not send the expression to a server.
Which cron dialect is this?
Vixie crontab(5) five-field schedule as shipped by Debian cron 3.0pl1 (Paul Vixie). Fields are minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–7; 0 and 7 are Sunday). * means first–last. Lists and numeric ranges are allowed. Steps are only after * or a-b (*/15, 0-23/2). One three-letter English name is allowed for month or weekday (jan, sun); lists or ranges of names are not. @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly expand to the Vixie nicknames. The example 30 4 1,15 * 5 (the crontab(5) OR example) explains to At 04:30, 1, 15 of every month (1–12), and also 5 (Friday). 30 4 1,15 * fri explains to that same summary. Click Explain to run the conversion.
How do day-of-month and day-of-week interact?
If both day fields are restricted (neither begins with *), Vixie cron ORs them. The example 30 4 1,15 * 5 explains to At 04:30, 1, 15 of every month (1–12), and also 5 (Friday) — 04:30 on the 1st and 15th, and also 04:30 every Friday. 30 4 1,15 * fri explains to that same summary. If a day field begins with * (Debian crontab(5) checks the first character, so */2 is star-like), both day fields must match (AND). 0 0 */2 * sun is midnight on Sundays that also fall on an odd day-of-month. This page does not compute the next fire time and has no timezone or DST table.
Is this Quartz, Jenkins, or systemd?
No. Six- or seven-field expressions (seconds / year), Quartz ? L W #, Jenkins H, cronie ~ randomization, @reboot (no schedule), a crontab username, and a command after the five fields are rejected. Quartz 0 30 4 1,15 * ? is rejected because ?. Month 0 and day-of-month 0 are rejected even though some crontab(5) tables list them — they do not match a calendar date here.

Related