Cron expression generator & parser

Cron expression for every Sunday (weekly)

To run a job once a week on Sunday at midnight, use 0 0 * * 0. The last field is the day of the week: 0 is Sunday, 1 is Monday and so on to 6 for Saturday, and most implementations also accept 7 for Sunday. @weekly is a shortcut for the same schedule.

Cron expression generator & parser
Preset
Show times in
Next runs
Cron expressionCRON

Press Command or Control plus Enter to run. Tab inserts indentation; press Escape, then Tab, to leave the editor.

Result
Your result will appear here.
Ready1 line · 9 chars

Weekly schedules

Many implementations accept names too, such as 0 9 * * MON, but numbers work everywhere.

ScheduleExpression
Every Sunday at 00:000 0 * * 0
Every Monday at 09:000 9 * * 1
Every Friday at 17:3030 17 * * 5
Saturday and Sunday at 10:000 10 * * 6,0
Monday to Friday at 08:000 8 * * 1-5
Monday, Wednesday and Friday at 07:000 7 * * 1,3,5

Day of month and day of week together mean OR

When both day fields are set, standard cron runs the job when either one matches, not both. 0 9 1-7 * 1 doesn't mean "the first Monday of the month": it runs on each of days 1 to 7 and on every Monday.

For the first Monday, schedule days 1 to 7 and check the weekday in the command (in crontab, % must be escaped as \%):

0 9 1-7 * * [ "$(date +\%u)" = 1 ] && /usr/local/bin/report.sh

Every two weeks

Cron has no "every other week". Run weekly and skip odd weeks in the command, using the ISO week number:

0 9 * * 1 [ "$(expr $(date +\%V) \% 2)" -eq 0 ] && /usr/local/bin/sprint-report.sh

Frequently asked questions

Is Sunday 0 or 7 in cron?

Both, in most implementations: 0 and 7 both mean Sunday. 0 is the most portable choice.

Is @weekly the same as 0 0 * * 0?

Yes, in Vixie cron, cronie and Kubernetes it runs at midnight between Saturday and Sunday. GitHub Actions doesn't support @weekly, so write 0 0 * * 0 there.

Which time zone is Sunday in?

The scheduler's. On a UTC server, 0 0 * * 0 runs on Saturday evening in the Americas. Use the tool's Local time option to check.

More cron expression generator & parser guides

Open the full cron expression generator & parser →

From the blog