DeveloperSeptember 21, 2025·8 min read

Cron Expressions: The Complete Syntax Guide with Examples

The complete cron expression guide: what each of the five fields means, all special characters (*, */n, ranges, lists), common schedule patterns, timezone rules, and platform differences (GitHub Actions, AWS EventBridge, Kubernetes).

A cron expression is a string of five fields that defines a recurring schedule for automated tasks. Each field specifies a time unit — minute, hour, day of month, month, and day of week — and together they describe exactly when a job should run. Cron expressions power scheduled tasks in Linux servers, GitHub Actions, AWS EventBridge, Kubernetes CronJobs, and virtually every backend scheduling system.

What does a cron expression look like?

A standard cron expression has five space-separated fields:

┌───────── minute (0–59)
│ ┌───────── hour (0–23)
│ │ ┌───────── day of month (1–31)
│ │ │ ┌───────── month (1–12)
│ │ │ │ ┌───────── day of week (0–7, both 0 and 7 = Sunday)
│ │ │ │ │
* * * * *

Example: 0 9 * * 1-5 means "at minute 0 of hour 9 (9:00 AM), every day of the month, every month, on weekdays (Monday through Friday)." In plain English: run at 9:00 AM every weekday.

Use the Cron Job Generator to build cron expressions visually and verify the plain-English description before deploying.

What does each field in a cron expression mean?

FieldPositionAllowed valuesSpecial characters
Minute1st0–59* , - /
Hour2nd0–23* , - /
Day of month3rd1–31* , - / ?
Month4th1–12 or JAN–DEC* , - /
Day of week5th0–7 (0 and 7 = Sunday) or SUN–SAT* , - /

What do the special characters mean in cron expressions?

What does * (asterisk) mean in cron?

The asterisk means "any value" or "every unit." * * * * * means "every minute of every hour of every day." An asterisk in the hour field means "every hour." In the month field, it means "every month."

What does */n (step value) mean in cron?

The / character with a number defines a step. */15 in the minute field means "every 15 minutes" — firing at 0, 15, 30, and 45 minutes past the hour. */2 in the hour field means "every 2 hours" — firing at 0, 2, 4, 6...22. The syntax */n means "starting from the minimum value, repeat every n units."

What does a range (1-5) mean in cron?

A hyphen defines a range. 1-5 in the day-of-week field means "Monday through Friday." 9-17 in the hour field means "9 AM through 5 PM." 1-6 in the month field means "January through June."

What does a comma mean in cron expressions?

Commas define a list. 1,3,5 in the day-of-week field means "Monday, Wednesday, and Friday." 0,30 in the minute field means "at minute 0 and minute 30" — the job runs twice per hour.

What are the most common cron expression patterns?

ExpressionPlain EnglishUse case
* * * * *Every minuteTesting only — too frequent for production
*/5 * * * *Every 5 minutesHealth checks, polling, monitoring
*/15 * * * *Every 15 minutesData sync, cache refresh
0 * * * *Every hour on the hourHourly reports, aggregation
0 0 * * *Every day at midnightDaily backups, batch processing
0 9 * * *Every day at 9:00 AMDaily digest emails, reports
0 9 * * 1-59:00 AM on weekdaysBusiness-hours jobs
0 0 * * 1Midnight every MondayWeekly cleanup, reports
30 8 * * 18:30 AM every MondayWeekly team digest
0 0 1 * *Midnight on the 1st of each monthMonthly billing, invoices
0 0 1 1 *Midnight on January 1stAnnual report generation
0 */6 * * *Every 6 hoursDatabase snapshots

For 20 additional examples across different use cases, see 20 cron job examples for common schedules.

What are the cron special strings like @daily and @reboot?

Most cron implementations support shorthand strings as alternatives to full five-field expressions:

StringEquivalentMeaning
@rebootRun once at system startup
@yearly0 0 1 1 *Once a year on January 1st
@monthly0 0 1 * *Once a month on the 1st
@weekly0 0 * * 0Once a week on Sunday at midnight
@daily0 0 * * *Once a day at midnight
@hourly0 * * * *Once an hour at the top of the hour

How does cron syntax differ across platforms?

The standard five-field cron syntax works in Linux crontab, but some platforms extend or modify it:

  • AWS EventBridge: Uses a six-field format with a year field:cron(0 9 * * ? 2026). Also supports rate() expressions:rate(1 day), rate(5 minutes).
  • GitHub Actions: Standard five-field syntax in on.schedule[0].cron. Always runs in UTC. Scheduled workflows can run up to 15 minutes late under load.
  • Kubernetes CronJob: Standard five-field syntax. Uses the container timezone by default — set spec.timeZone explicitly.
  • Node.js (node-cron): Supports a six-field format with an optional seconds field at the start: second minute hour day month weekday.

What timezone do cron jobs run in?

By default, cron runs in the server's local timezone — almost always UTC on cloud infrastructure. If you write 0 9 * * * meaning "9 AM" and your server is in UTC, the job runs at 9 AM UTC — which is 4 AM EST or 1 AM PST. This is the single most common cause of cron jobs running at the "wrong" time.

Fix options: set TZ=America/New_York at the top of your crontab, calculate the UTC equivalent manually, or use a platform like AWS EventBridge that supports timezone configuration natively.

For a complete troubleshooting guide covering timezone issues and every other reason a cron job might not run, see how to debug cron jobs that are not running at the expected time.

Key takeaways

  • A cron expression has five fields: minute, hour, day-of-month, month, day-of-week.
  • * means "any value." */n means "every n units." 1-5 is a range. 1,3,5 is a list.
  • Cloud servers run UTC by default — always confirm which timezone your cron environment uses.
  • GitHub Actions cron always runs UTC and can be up to 15 minutes late.
  • Use the Cron Job Generator to build and verify expressions before deploying.

Frequently asked questions

What is the minimum interval for a cron job?

Standard cron has a 1-minute minimum resolution — the smallest interval is* * * * * (every minute). For sub-minute scheduling, use application-level timers (Node.js setInterval, PythonAPScheduler) or a job queue that supports second-level intervals.

Can a cron expression run a job multiple times per hour?

Yes — use */15 * * * * to run every 15 minutes, or 0,30 * * * * to run at minute 0 and minute 30 (twice per hour). Any combination that stays within the five-field format is valid.

What is the difference between day of month and day of week in cron?

When both are specified (not *), most cron implementations use OR logic — the job runs if either condition is true. To run a job "on the first Monday of the month," you cannot express this purely in a cron expression; you need to add a check inside the script itself.

How do I run a cron job at a specific time in a different timezone?

Add TZ=America/New_York (or your desired timezone) as the first line of your crontab file, before any job entries. All subsequent entries will use that timezone. Alternatively, calculate the UTC equivalent of your desired local time and write the UTC time in the expression.

Why does crontab.guru show a different time than I expect?

crontab.guru shows run times in UTC. If your server runs in a different timezone, convert the displayed UTC times to your local time. The expression itself does not change — only the timezone interpretation does.

Free tool

Try the Cron Job Generator

Use our free cron job generator to calculate results instantly — no signup required.

Open Cron Job Generator
Tags:croncron expressioncron syntaxcrontabschedulinggithub actionsaws