# Run a Cron Job on the First of Every Month

> The cron expression for the 1st of each month at midnight is 0 0 1 * *. Field meanings, next runs, and the day-of-week OR gotcha.

```
0 0 1 * *
```

In plain English: At 00:00 (midnight), on day 1 of the 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.

## 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 finish
- `0 0 1 */3 *` — quarterly — the 1st of Jan, Apr, Jul, Oct
- `0 0 1 1 *` — yearly — midnight on January 1st (@yearly)

## FAQ

### 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.

## Related schedules

- [0 0 * * * — Run a Cron Job Every Day at Midnight](https://www.devkult.com/cron/every-day-at-midnight.md)
- [0 0 * * 0 — Run a Cron Job Every Sunday](https://www.devkult.com/cron/every-sunday.md)
- [0 9 * * 1 — Run a Cron Job Every Monday](https://www.devkult.com/cron/every-monday.md)

Open the interactive page: https://www.devkult.com/cron/first-of-month