Skip to content

Cron Expression Examples

Copy a ready-made schedule and see exactly when it runs.

About Cron examples

A cron expression schedules a recurring job with five fields: minute, hour, day of month, month and day of week. It's used by crontab on Linux and macOS, Kubernetes CronJobs, GitHub Actions (on: schedule), and most cloud schedulers. The examples below use standard five-field syntax; paste any of them into the cron expression parser to check it reads the way you expect.

Some schedulers extend the format. Quartz (Java) and Spring add a seconds field at the start and use ? in one day field, AWS EventBridge has six fields with a year at the end, and several support L for the last day of the month. Standard cron can't express 'the last day of the month' directly; a common workaround is to run on days 28-31 and have the job check whether tomorrow is the 1st.

45 entries

Common schedules

ExpressionRunsNote
* * * * *Every minute
*/5 * * * *Every 5 minutesAt minutes 0, 5, 10 ... 55
*/10 * * * *Every 10 minutes
*/15 * * * *Every 15 minutesAt :00, :15, :30 and :45
*/30 * * * *Every 30 minutes
0 * * * *Every hour, on the hour
15 * * * *Every hour at 15 minutes past
0 */2 * * *Every 2 hoursAt 00:00, 02:00, 04:00 ...
0 */6 * * *Every 6 hoursAt 00:00, 06:00, 12:00 and 18:00
0 0 * * *Every day at midnightSame as @daily
0 3 * * *Every day at 03:00A common time for backups
0 9 * * *Every day at 09:00
30 18 * * *Every day at 18:30
0 9,17 * * *Every day at 09:00 and 17:00
0 9-17 * * *Every hour from 09:00 to 17:00
0 9 * * 1-5Weekdays at 09:00Monday (1) to Friday (5)
*/15 9-17 * * 1-5Every 15 minutes from 09:00 to 17:45 on weekdaysThe hour range 9-17 includes 17:00-17:59
0 22 * * 1-5Weekdays at 22:00
0 10 * * 6,0Saturdays and Sundays at 10:00
0 0 * * 0Every Sunday at midnightSame as @weekly; 7 also means Sunday
0 8 * * 1Every Monday at 08:00
0 17 * * 5Every Friday at 17:00
5 4 * * 0Every Sunday at 04:05
0 0 1 * *First day of every month at midnightSame as @monthly
0 0 15 * *The 15th of every month at midnight
0 0 1,15 * *The 1st and 15th of every month
0 0 1 */3 *Quarterly: January, April, July and October 1stMonths 1, 4, 7 and 10
0 0 1 1 *Once a year on January 1st at midnightSame as @yearly and @annually
0 12 * 12 *Every day in December at noon
0 0 1 * 1The 1st of the month AND every MondayDay of month and day of week combine with OR in standard cron

The five fields

In order, separated by spaces.

FieldAllowed valuesNote
Minute0-59
Hour0-23
Day of month1-31
Month1-12 or JAN-DEC
Day of week0-7 or SUN-SAT0 and 7 are both Sunday

Operators

SymbolMeaningExample
*Every value* in the hour field: every hour
,A list of values1,15 in day of month: the 1st and 15th
-A range1-5 in day of week: Monday to Friday
/A step*/10 in minutes: every 10 minutes; 5-59/10: 5, 15, 25 ...

@ nicknames

Supported by Vixie cron, cronie and many schedulers, but not all: check yours.

NicknameRunsEquivalent
@yearlyOnce a year0 0 1 1 * (also @annually)
@monthlyOnce a month0 0 1 * *
@weeklyOnce a week, Sunday midnight0 0 * * 0
@dailyOnce a day at midnight0 0 * * * (also @midnight)
@hourlyOnce an hour0 * * * *
@rebootOnce, when the cron daemon startsNot a time schedule; unsupported in Kubernetes and most cloud schedulers

Good to know

Time zones

Cron runs in the scheduler's time zone. crontab uses the server's local time (often UTC on servers), and GitHub Actions schedules are always UTC. Kubernetes CronJobs use the controller's time zone unless you set spec.timeZone.

Day of month and day of week

If both fields are restricted (neither is *), standard cron runs the job when either one matches. 0 0 13 * 5 runs on every 13th and on every Friday, not only on Friday the 13th.

More references