Disclosure: Some tools link to SaaS products we may earn a commission from — at no cost to you. All tools are free and run entirely in your browser. See full disclosure →
$ cron
MinuteHourDayMonthWeekday
Quick insert:

Cron syntax: the five fields explained

Cron has exactly five fields. Each field specifies a time dimension. A job runs when all five fields match the current time simultaneously.

Position Field Range Notes
1 Minute 0–59 Minutes past the hour
2 Hour 0–23 24-hour clock; 0 = midnight
3 Day of month 1–31 Calendar date; not all months have 31 days
4 Month 1–12 Also accepts Jan–Dec abbreviations
5 Day of week 0–7 0 and 7 both mean Sunday; also accepts Sun–Sat

The expression 0 9 * * 1-5 reads as: minute 0, hour 9, any day of month, any month, Monday through Friday. Result: 9:00 AM every weekday. The wildcard * means "every valid value for this field."

Special characters: *, /, -, and ,

Asterisk * — matches every value in the field's range. * * * * * runs every minute of every day.

Slash / — defines a step interval. */10 in the minute field means "every 10 minutes." 0-30/5 means "every 5 minutes from :00 to :30." The step divides the range, not the absolute clock — */7 in hours fires at 0, 7, 14, 21 (not "every 7 hours from now").

Hyphen - — defines an inclusive range. 1-5 in the day-of-week field means Monday through Friday. 9-17 in the hour field means 9am through 5pm.

Comma , — defines a list of values. 0,15,30,45 in the minute field fires four times per hour, on the quarter-hours. 1,3,5 in month fires in January, March, and May. You can mix commas with ranges: 0,6,12-14.

20 common cron expressions and what they do

These cover 90% of production scheduling needs. Paste any into the parser above to verify the next run times before deploying.

* * * * * Every minute
0 * * * * Every hour, on the hour
0 0 * * * Every day at midnight (UTC or server TZ)
0 2 * * * Every day at 2am — common for nightly backups
0 9 * * 1-5 Weekdays at 9am
0 9,17 * * * Every day at 9am and 5pm
*/15 * * * * Every 15 minutes
0 */6 * * * Every 6 hours (midnight, 6am, noon, 6pm)
0 0 1 * * First of every month at midnight
0 0 1 1 * Once per year: January 1st at midnight
0 0 * * 0 Every Sunday at midnight
30 23 * * 5 Every Friday at 11:30pm
0 8-18 * * 1-5 Every hour from 8am to 6pm on weekdays
0 0 15 * * 15th of every month at midnight
0 12 * * 3 Every Wednesday at noon
5 4 * * 0 Sundays at 4:05am — stagger from midnight to avoid load spikes
0 0 * * 1,4 Mondays and Thursdays at midnight
0 */4 * 3-6 * Every 4 hours, March through June only
0 9 * * 1 Every Monday at 9am — weekly report trigger
*/10 9-17 * * 1-5 Every 10 minutes during business hours, weekdays

Four cron gotchas that bite production systems

1. Day-of-month OR day-of-week, not AND. Most Unix cron implementations use OR semantics when both day-of-month and day-of-week are non-wildcard. 0 0 15 * 5 fires on the 15th of every month AND every Friday at midnight — not just "the 15th if it falls on a Friday." Use * in whichever field you don't want to constrain.

2. Timezone is the server's timezone, not yours. A job scheduled for 0 9 * * * runs at 9am in whatever timezone the cron daemon is configured for — usually UTC on cloud VMs. A Vancouver-based developer thinking "9am" will get a 2am local job (UTC-7). Always explicitly set CRON_TZ or use platform-level timezone settings.

3. Daylight Saving Time creates ghost runs and missed runs. When clocks spring forward, 2:30am never exists — a job scheduled for that time is silently skipped. When clocks fall back, 1:30am runs twice. If you have jobs near DST transition times, schedule them at safe hours (midnight, 3am) and monitor for double-runs on the fall-back Sunday.

4. */n is not "every n units from now." */7 in the hour field does NOT mean "every 7 hours from when the daemon started." It means "every hour whose value is divisible by 7" — so 0, 7, 14, 21. That is 4 runs per day, not 3.4. If you want a job every 7 hours, you need a different mechanism (a wrapper script with a sleep, or a platform that supports duration-based scheduling like GitHub Actions' schedule with a manual offset).

Cron in Cloudflare Workers and serverless platforms

Traditional cron lives on a server. Modern serverless platforms expose the same syntax but with important differences.

Cloudflare Workers Cron Triggers — defined in wrangler.toml under [triggers]. They use standard cron syntax and always fire in UTC. The maximum interval between runs is once per minute; the minimum is also enforced (you can't go faster than once per minute). Cron Triggers invoke your Worker's scheduled() handler, not fetch(). Cloudflare Workers is genuinely the easiest way to run a globally distributed cron job — no server, no uptime management, 100K free invocations per day on the free tier.

GitHub Actions scheduled workflows — use the schedule event with a cron expression under on. Note: GitHub Actions schedules can be delayed by up to 1 hour during high-load periods. They're suitable for non-time-critical jobs (weekly reports, dependency updates) but not for anything requiring second-level precision.

AWS EventBridge Scheduler — supports both cron expressions and rate expressions (rate(15 minutes)). Unlike vanilla cron, EventBridge supports a 6-field variant with a seconds field. It also supports timezone-aware scheduling via the --schedule-expression-timezone parameter, which is the correct solution for the UTC confusion problem.

Whichever platform you use, test the expression here first, confirm the next 10 runs match your intent, and check the platform's UTC-vs-local documentation before deploying.

Ship your cron job to the edge

Cloudflare Workers Cron Triggers run globally in UTC, require no server, and cost nothing on the free tier (100K invocations/day). If you're still SSHing into a VPS to run crontab -e, there's a better option.

Try Cloudflare Workers →

FAQ

What is a cron expression? +
A cron expression is a string of five space-separated fields that defines a schedule: minute (0–59), hour (0–23), day-of-month (1–31), month (1–12), and day-of-week (0–7, where both 0 and 7 mean Sunday). The Unix cron daemon reads these expressions and runs the specified command whenever the current time matches all five fields simultaneously. For example, '0 9 * * 1-5' means 'at 9:00 AM on every weekday (Monday through Friday).'
What does */ mean in a cron field? +
The */ syntax is a step modifier. */n means 'every n units.' For example, */15 in the minute field means 'every 15 minutes' (runs at :00, :15, :30, :45). */6 in the hour field means 'every 6 hours' (runs at 00:00, 06:00, 12:00, 18:00). You can also use a range with a step: 0-30/5 means 'every 5 minutes within the first half of the hour.'
What is the difference between day-of-month and day-of-week? +
Day-of-month (field 3) triggers on specific calendar dates: '1' means the 1st of every month, '15' means the 15th. Day-of-week (field 5) triggers on specific weekdays: '1' = Monday, '5' = Friday, '1-5' = Monday through Friday. When both are set to non-wildcard values, most Unix cron implementations trigger if EITHER condition matches (OR logic). Set one to * and constrain only the other to get AND logic.
Can I use names instead of numbers for months and weekdays? +
Yes. Standard cron accepts three-letter English abbreviations: Jan–Dec for months (field 4) and Sun–Sat for weekdays (field 5). This tester accepts them case-insensitively. '0 0 * Dec Fri' runs at midnight on every Friday in December — same as '0 0 * 12 5'.
What is @reboot, @daily, @weekly in cron? +
These are shorthand aliases supported by many cron implementations: @reboot runs once at system startup, @daily is equivalent to '0 0 * * *' (midnight every day), @weekly is '0 0 * * 0' (midnight every Sunday), @monthly is '0 0 1 * *' (midnight on the 1st of each month), @hourly is '0 * * * *'. This parser handles the five-field standard format — enter the equivalent five-field expression for @-shortcuts.
Why are run times shown in my local timezone? +
This tool runs entirely in your browser and uses your system clock. All 'next run' calculations are based on your local timezone via JavaScript's Date object. Server-side cron daemons typically run in UTC or the server's configured timezone — when deploying, always check that your cron daemon's timezone matches your intent. Cloudflare Workers Cron Triggers, for example, execute in UTC regardless of the invoking region.
Checkers & Parsers
Regex Tester JWT Decoder Color Contrast Checker
💡
Need AI tools for your development workflow?

Explore our reviews of the best AI coding assistants, documentation generators, and developer productivity tools — ranked by real-world usefulness.

Browse AI Tools for Developers →
The DevTools Team
Infinfy Engineering
We build free developer utilities that we actually use ourselves. No accounts, no tracking, no backend — just fast, accurate, in-browser tools. Part of Infinfy Solutions.