Cron Expression for the First of the Month

First of the month, 12 times a year
0 0 1 * *

Cron reads this as: at 00:00, on day-of-month 1.

Next 5 runs

These times are in your browser's local time zone. Cron itself uses the server's zone, which on most cloud hosts is UTC. If the difference matters here, see time zones & DST.

When to use this schedule

This runs at midnight on the 1st. Typical jobs are monthly billing runs, invoice generation, quota resets and archiving the previous month. @monthly is the shorthand form.

What to watch out for

A job that processes "last month" at 00:00 on the 1st is doing the right thing. A job that processes "this month" runs before the month has any data in it. Otherwise the 1st is a safe choice, because it exists in every month, unlike the 29th, 30th and 31st. If you need the end of the month instead, you need a different approach.

The crontab line

0 0 1 * * /usr/local/bin/your-job.sh >> /var/log/your-job.log 2>&1

Send the output to a log you will read. By default cron mails it, and on a host with no mail transport that mail is silently dropped. See the crontab guide for the surrounding syntax.

Related schedules

Variations on first of the month
ExpressionSchedule
@monthlyShorthand for the same schedule
0 3 1 * *The 1st at 03:00
0 0 1,15 * *1st and 15th

Build your own

If this page doesn't cover the schedule you need, compose it field by field in the visual builder, or paste an expression you already have into the explainer for a per-field breakdown. The examples library has sixty schedules in one place, and the guides cover crontab syntax, time zones, troubleshooting and production practices.