Run a Cron Job on the First of Every Month
Pinning day-of-month to 1 makes this fire at midnight on the first day of every month — the standard slot for billing runs, monthly reports, and quota resets. It's also where cron's most surprising rule lives: combine it with a day-of-week and the two match as OR, not AND.
0 0 1 * *In plain English: At 00:00 (midnight), on day 1 of the month.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | 1 | 1 |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
0 6 1 * *the 1st at 06:00 — after nightly jobs finish0 0 1 */3 *quarterly — the 1st of Jan, Apr, Jul, Oct0 0 1 1 *yearly — midnight on January 1st (@yearly)Tweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
How do I run on the last day of the month?
Standard cron has no 'last day' syntax (some extensions support L). The portable trick: run on the 28th–31st and have the job check whether tomorrow is the 1st — [ $(date -d tomorrow +%d) = 01 ] || exit.
What does 0 0 1 * MON do?
Not 'the 1st when it's a Monday' — standard cron treats a restricted day-of-month and day-of-week as an OR, so it runs on every 1st and on every Monday. Put the AND logic inside the job if you need it.
New to cron syntax? Read Cron Expressions Explained, Field by Field.