Skip to content
ToolDesk

How to Write a Cron Expression — Reading the 5 Fields

Updated 2026-07-28

A cron expression encodes a repeating schedule — "every morning at 9", "weekdays only", "every 5 minutes" — in a single line. It is widely used for server cron jobs, CI, and job schedulers. The symbols can look cryptic at first, but once you know the five fields, they become readable.

The five fields

A standard cron expression has five space-separated fields. From left: minute, hour, day-of-month, month, day-of-week. For example, "0 9 * * 1-5" means minute=0, hour=9, day=any, month=any, weekday=Mon–Fri — i.e., "9:00 sharp on weekdays."

Common symbols

  • * … all values for that field (every minute/hour, etc.)
  • , … a list of values (e.g., 1,15 means 1 and 15)
  • - … a range (e.g., 1-5 means 1 through 5)
  • */n … every n (e.g., */5 in minutes means every 5 minutes)
  • Day-of-week is 0–6 (0=Sunday); many implementations also treat 7 as Sunday

When both day-of-month and day-of-week are set

A subtle case: when both the day-of-month (3rd) and day-of-week (5th) fields are set to something other than *, traditional cron treats them as OR, not AND. So "1st of the month" OR "every Monday" — it runs if either matches. This is counterintuitive, so split complex conditions or verify with the actual next run times.

Watch out for seconds and time zones

A standard 5-field cron has no seconds field (only some extended implementations allow seconds). Also, which time zone the schedule is evaluated in (server time or otherwise) varies by environment. Always confirm it fires at the intended time by checking the actual next run.

Enter an expression into our cron parser to see a human-readable description and upcoming run times (5 fields, based on your browser’s local time). Use it to check that your expression does what you intend.

Related tools