The expression
0 0 * * 1
Runs once a week, at 00:00 at the start of every Monday.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 |
at minute 0 |
| Hour | 0 |
at midnight |
| Day of month | * |
any day |
| Month | * |
every month |
| Day of week | 1 |
Monday |
In standard cron, Monday is 1: the week starts at 0 for Sunday and ends at 6 for Saturday (7 is Sunday again). 0 0 * * MON is the same schedule and harder to get wrong. To run on Monday morning instead of the very start of the day, change the hour: 0 9 * * 1 is Monday at 9:00.
Variants
| Schedule | Expression |
|---|---|
| Monday at 9am | 0 9 * * 1 |
| Monday at 8:30 | 30 8 * * 1 |
| Monday and Thursday at 9am | 0 9 * * 1,4 |
| Every hour on Mondays | 0 * * * 1 |
| Every other Monday | 0 0 * * 1 plus a week test |
| The first Monday of the month | 0 0 1-7 * * plus [ "$(date +\%u)" = 1 ] |
| Every weekday, Monday to Friday | 0 0 * * 1-5 |
The "first Monday" row needs a shell test because 0 0 1-7 * 1 does not mean "a Monday between the 1st and 7th". When both day fields are restricted, cron runs when either matches, so that line fires on the 1st to 7th of every month and on every Monday. The fix is to schedule days 1-7 and let the command check that today is Monday (date +%u prints 1 for Monday; inside a crontab, % must be written \%).
Where to write it
- crontab (Linux, macOS):
0 0 * * 1 /usr/local/bin/weekly-report.shincrontab -e, in the server's time zone. - GitHub Actions:
on: schedule: - cron: '0 0 * * 1'. It runs at 00:00 UTC Monday, which is Sunday afternoon or evening across the Americas. Dependency update and weekly audit workflows often use this slot, and midnight UTC is busy, so delays of several minutes are normal. - Kubernetes CronJob:
schedule: "0 0 * * 1"withtimeZone:to run at your local Monday midnight. - AWS EventBridge:
cron(0 0 ? * MON *). EventBridge counts 1 = Sunday, so Monday is2in numbers; useMON.
Common mistakes
- Monday is not
0.0is Sunday.0 0 * * 0is every Sunday at midnight. - "Monday night" ambiguity.
0 0 * * 1runs in the first minute of Monday, which many people call Sunday night. For the end of Monday use59 23 * * 1or0 0 * * 2. - Unescaped
%in crontab. Cron turns%into a newline, sodate +%uin a crontab line breaks the command.
See the next Mondays in the Cron Expression Parser.