Why you would check one
- You inherited a server and want to know when the lines in its crontab actually fire
- A GitHub Actions schedule or a Kubernetes CronJob is about to ship and you want a second look first
- Someone asked for "every 40 minutes" or "the last day of the month" and you want proof the expression says that
- The server keeps UTC but the job has to run at a set local time somewhere else
How fields expand, and why intervals come out uneven
Each field expands into a set of numbers, and the job runs in every minute where all five sets match. A step, /, counts from the start of its range; it does not mean "this many minutes after the last run". So */40 is minute 0 and minute 40 of every hour. Checked at 09:05, the runs are 09:40, then 10:00, then 10:40: forty minutes, then twenty, alternating.
Hours behave the same way. 0 */7 * * * is 00, 07, 14 and 21, so after 21:00 the next run is midnight, only three hours later. 1-30/10 counts from minute 1: 1, 11 and 21. The search starts at the next minute and steps forward, skipping whole days and hours that cannot match. An impossible date such as 30 February is searched for 400 years ahead and then returns a message that the expression never runs instead of an empty list. The Gregorian calendar repeats its dates and weekdays every 400 years (146,097 days, exactly 20,871 weeks), so what does not occur in 400 years never occurs.
Worked example: leap days and the 31st
- 1Entered on 24 October 2026, 0 0 29 2 * lists 2028-02-29, 2032-02-29, 2036-02-29, 2040-02-29 and 2044-02-29. It is a leap-year-only job.
- 20 0 31 * * runs only in months that have a 31st: 2026-10-31, then 2026-12-31, 2027-01-31, 2027-03-31 and 2027-05-31, skipping November, February and April.
- 3For a true last-day-of-month job, without the L symbol this tool does not read, run on days 28–31 and let the command check whether tomorrow is the 1st. With GNU date: [ "$(date -d tomorrow +\%d)" = 01 ].
- 4The % is written \% because in the command part of a crontab line an unescaped % becomes a newline (POSIX). It is a classic reason for a job that fires on time and then runs half a command.
UTC servers and the weekday that slips
Say a job must run at 07:00 on weekdays in Seoul, on a server that keeps UTC. Subtracting nine hours gives 22:00, and 0 22 * * 1-5 looks right, but 07:00 on a Seoul Monday is 22:00 on Sunday in UTC, so the weekdays have to move back one as well. With the server clock set to UTC, 0 22 * * 0-4 gives a first run of 2026-10-25 22:00, a Sunday, which is 07:00 on Monday 26 October in Seoul. Evening jobs for places west of UTC slip the other way, into the next UTC day.
GitHub Actions runs schedules in UTC unless you give an IANA time zone, allows nothing more often than every 5 minutes, and warns that runs at busy times such as the top of the hour can be delayed or dropped, so an odd minute like :07 is the safer pick. Kubernetes CronJobs take a time zone in .spec.timeZone, stable since v1.27, and reject a schedule that tries to set CRON_TZ or TZ inline.
Daylight saving time
On this device’s clock the tool simply walks the local clock minute by minute. In New York, 30 2 * * * lists 2026-03-07 02:30 and then 2026-03-09 02:30, because on 8 March the clock jumps from 02:00 to 03:00 and 02:30 never happens. On 1 November, when the 01:00 hour happens twice, 30 1 * * * still appears once.
A real cron daemon may not agree. The cron(8) manual for cronie says that for time changes of under three hours, jobs set for a specific time that fall in a skipped interval run immediately after the change, and jobs in a repeated interval are not run twice. Korea has no daylight saving, but if the server lives in a region that does, read the list with that difference in mind.
Formats that look similar but are not
- POSIX itself defines only numbers, ranges, lists, * and weekdays 0–6. Steps, month and day names, 7 for Sunday and aliases such as @daily are Vixie cron extensions, which very old or minimal systems may lack.
- AWS EventBridge uses six fields, with a year at the end, and requires ? in either the day-of-month or the day-of-week field. Quartz-style expressions put seconds first and have six or seven fields. Either kind gets a message asking for five fields.