Skip to content
cronhelp.me
Preset

Cron expression for the first day of the month

0 0 1 * *
Cron expression5-field
At 12:00 AM, on day 1 of the month
Lint
OKNo issues found — this expression is well-formed.
Next runs
#
1
2
3
4
5
6
7
Copy as

What it does

The expression 0 0 1 * * runs a job at 00:00 on the 1st of every month. Minute and hour are 0, the day-of-month field is 1, and month and day-of-week are *. It fires twelve times a year, at the start of each month.

First-of-month is the natural home for monthly work: invoices, statements, usage resets, and month-boundary reports. Running at midnight on the 1st means the previous month is fully closed before the job starts.

It is equivalent to @monthly. Keep the day-of-week field as *: if you restrict it as well — say 0 0 1 * 1 hoping for "the first Monday" — cron will run on the 1st and every Monday, because it takes the union of the two day fields. "First Monday of the month" cannot be expressed in a single standard cron line; restrict the date and check the weekday inside your script.

Related presets

FAQ

Is 0 0 1 * * the same as @monthly?
Yes. @monthly expands to 0 0 1 * * — midnight on the 1st of every month.
How do I run on the first Monday of the month?
You cannot do it in one standard cron line. Use 0 0 1-7 * * to fire on the first week, then exit early in your script unless it is Monday.
How do I run on the last day of the month?
Standard cron has no "last day" token. Some dialects support L; otherwise run daily and exit unless tomorrow is the 1st.