A cron expression is five short fields that decide when a job runs: backups, report emails, cache refreshes, cleanup scripts. Because the syntax is so compact, a single wrong character can turn "once a day" into "every minute for an hour", and nobody notices until the bill or the inbox fills up.
This guide explains how to read each field, the rules that surprise even experienced developers, and how to confirm a schedule before you deploy it.
Who this is for
Developers and operations engineers writing crontab entries, CI schedules, or Kubernetes CronJobs, and anyone who has inherited a line like 0 */6 * * 1-5 and needs to know what it does.
The five fields
Standard cron reads the fields left to right as minute, hour, day of month, month, and day of week. A job runs at every minute where all five fields match the current time, with one important exception covered below.
- Minute: 0-59
- Hour: 0-23, on a 24-hour clock
- Day of month: 1-31
- Month: 1-12
- Day of week: 0-6, where 0 is Sunday; most implementations also accept 7 as Sunday
Wildcards, lists, ranges, and steps
An asterisk means "every value". A comma separates a list of values, a hyphen gives an inclusive range, and a slash gives a step. These combine: 0-30/10 in the minute field means minutes 0, 10, 20, and 30.
A step counts from the start of the range, not from when the job was installed. */15 in the minute field fires at :00, :15, :30, and :45 every hour. */7 fires at :00, :07, ... :56, and then at :00 again four minutes later, because the count restarts each hour. Steps that do not divide the range evenly produce uneven gaps.
- 30 2 * * * - every day at 02:30
- 0 9 * * 1-5 - 09:00 Monday to Friday
- */15 * * * * - every 15 minutes
- 0 0 1 * * - midnight on the first day of every month
- 0 */6 * * * - every six hours, at 00:00, 06:00, 12:00, and 18:00
The most common mistake: a star in the minute field
People who want a job to run "at 3 AM" often write * 3 * * *. That runs every minute from 03:00 to 03:59, sixty times. The minute field needs a specific value: 0 3 * * *. Read every expression from the left and ask whether each field is as narrow as you intend.
Day of month and day of week combine with OR
This rule surprises almost everyone. In the classic Vixie cron used by most Linux systems, if both the day-of-month and the day-of-week fields are restricted (neither is *), the job runs when either one matches, not when both do.
So 0 9 13 * 5 does not mean "09:00 on Friday the 13th". It means 09:00 on the 13th of every month and also 09:00 every Friday. If you need both conditions together, schedule on one field and check the other inside the script, for example run every Friday and exit early unless the date is the 13th.
Which time zone is cron using?
A cron expression has no time zone of its own. It is evaluated in whatever zone the scheduler runs in. A crontab on a server uses the server’s system time zone, which on cloud machines and containers is very often UTC. GitHub Actions scheduled workflows always use UTC. Kubernetes CronJobs use the controller’s zone unless you set the timeZone field on the CronJob.
Writing 0 9 * * * for a 9 AM report in New York on a UTC server sends it at 4 or 5 AM local time, depending on the season. Before deploying, confirm the scheduler’s zone and convert your intended local time to it. A timestamp converter helps check what a given UTC time is in another zone.
Daylight saving time
If the scheduler runs in a zone with daylight saving, one hour disappears each spring and one hour repeats each autumn. A job set for 02:30 may not run on the spring transition day because 02:30 never happens, and an hourly job may run twice around the autumn change. Implementations differ in how they handle these hours, so do not rely on a particular behaviour.
The simplest protection is to schedule important jobs outside the 01:00 to 03:00 window, or to run the scheduler in UTC, which has no daylight saving changes.
Dialects you will run into
Not every system uses the five-field form. Quartz, used by many Java applications, adds a seconds field at the front and an optional year at the end, and uses ? to mean "no specific value" in one of the day fields. Some crontab implementations accept macros such as @daily and @reboot, and names like MON or JAN. AWS EventBridge uses six fields with its own rules. Check which dialect your platform expects before pasting an expression from elsewhere; a five-field expression in a six-field system shifts every value one place to the left.
Checking a schedule before you deploy
A minute of checking avoids a night of duplicate emails.
- Read the expression back in words: "at minute 0 of hour 3, every day".
- List the next five run times and confirm they match your intent.
- Confirm the time zone of the machine or service that runs the job.
- If both day fields are set, remember they combine with OR.
- Avoid the daylight saving window for jobs that must run exactly once.
- Make the job safe to run twice, so a duplicate run does no harm.
Takeaway
Cron is minute, hour, day of month, month, day of week, evaluated in the scheduler’s time zone. Put a number in the minute field, remember that the two day fields combine with OR, know which zone you are in, and preview the next run times before deploying. ToolMint’s Cron Expression Generator builds standard five-field expressions, describes them in plain English, and lists upcoming runs in your browser’s time zone so you can check a schedule before it goes live.