LocalBench

Cron Syntax Cheat Sheet, With Examples

Published September 19, 2026

A standard cron expression is five space-separated fields, each controlling when a job runs. Get the field order wrong and a job that was meant to run daily can silently run every minute, or never at all — this cheat sheet covers every field, the special characters that combine them, and the shorthand aliases most cron implementations also accept.

The five fields

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *
  • Minute — 0 through 59
  • Hour — 0 through 23 (24-hour clock)
  • Day of month — 1 through 31
  • Month — 1 through 12, or a 3-letter name (JAN-DEC)
  • Day of week — 0 through 6 where 0 is Sunday (7 is also accepted as Sunday in most implementations), or a 3-letter name (SUN-SAT)

Special characters

  • * — "every value" for that field. * * * * * runs every minute.
  • , — a list. 0 9,17 * * * runs at 9:00 AM and 5:00 PM every day.
  • - — a range. 0 9-17 * * * runs at the top of every hour from 9 AM through 5 PM.
  • / — a step, usually combined with a range or *. */15 * * * * runs every 15 minutes; 0 */2 * * * runs at the top of every even hour.
  • Ranges, lists, and steps combine: 0 9-17/2 * * 1-5 runs at 9, 11, 13, 15, and 17:00, Monday through Friday.

The day-of-month / day-of-week interaction

If both the day-of-month and day-of-week fields are restricted (neither is *), most cron implementations treat them as OR, not AND — the job runs when either condition is true. For example, 0 0 1 * 1 runs at midnight on the 1st of the month and every Monday, not only on Mondays that happen to be the 1st. If you only want one of the two conditions, leave the other field as *.

Shorthand aliases (@daily, @hourly, …)

Many cron implementations (including this site's Cron Explainer) also accept these shortcuts:

  • @yearly / @annually — once a year at midnight on January 1st, equivalent to 0 0 1 1 *
  • @monthly — once a month at midnight on the 1st, equivalent to 0 0 1 * *
  • @weekly — once a week at midnight on Sunday, equivalent to 0 0 * * 0
  • @daily / @midnight — once a day at midnight, equivalent to 0 0 * * *
  • @hourly — once an hour, on the hour, equivalent to 0 * * * *

Worked examples

  • 0 2 * * * — every day at 2:00 AM
  • */5 * * * * — every 5 minutes
  • 0 0 * * 0 — every Sunday at midnight
  • 0 9 * * 1-5 — 9:00 AM, Monday through Friday
  • 0 0 1 1 * — once a year, January 1st at midnight
  • 0 */6 * * * — every 6 hours (12 AM, 6 AM, 12 PM, 6 PM)

Try it yourself

Paste any cron expression — standard 5-field syntax or an @daily-style shorthand — into our Cron Explainer to get a plain-English description and the next 10 run times, computed in your local timezone. Runs entirely in your browser.

Try It Yourself

← Back to all guides