Run on the First Monday of the Month | CronBase

cron expression Standard
$ 0 9 * * 1#1

At nine o'clock in the morning on the first Monday of every month.

The `0 9 * * 1#1` cron expression schedules a task to execute at exactly 9:00 AM on the first Monday of every month. It is commonly used for generating monthly business reports, triggering compliance audits, or kicking off payroll processing workflows at the start of the first work week.

Minute
0
Hour
9
Day of Month
*
Month
*
Day of Week
1#1

Next 5 Runs

  • in 2d 22h
  • in 9d 22h
  • in 16d 22h
  • in 23d 22h
  • in 30d 22h

* Tools

Code & Implementations

nodejs
const cron = require('node-cron');

// Node-cron does not natively parse the '#' modifier.
// We schedule the callback to run every Monday at 9:00 AM
// and programmatically guard the execution to the first 7 days of the month.
cron.schedule('0 9 * * 1', () => {
    const now = new Date();
    const dayOfMonth = now.getDate();

    if (dayOfMonth <= 7) {
        console.log(`[${now.toISOString()}] Executing monthly report generation...`);
        try {
            // Insert your business logic, database queries, or API calls here
        } catch (error) {
            console.error('Failed to run monthly job:', error);
        }
    } else {
        console.log(`[${now.toISOString()}] Skipping execution: Day of month is ${dayOfMonth}.`);
    }
}, {
    timezone: "America/New_York"
});
Setup notes

Install node-cron via npm. This script schedules a weekly check on Mondays at 9:00 AM EST/EDT, executing your logic only if it is the first Monday of the month.

Partner UptimeRobot

Keep this cron job monitored 24/7

UptimeRobot alerts you the moment a scheduled job stops responding. Free plan monitors up to 50 endpoints — no credit card required.

Platform Equivalents

Systemd Timer

OnCalendarMon *-*-* 09:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 9 * * 1#1

[Timer]
OnCalendar=Mon *-*-* 09:00:00
Persistent=true

[Install]
WantedBy=timers.target

Frequently Asked Questions

What happens if the first Monday falls on a public holiday?

Standard cron schedulers do not have awareness of regional holidays. The job will execute unconditionally. To handle holidays, your application logic must check a calendar API or database and defer execution if necessary.

Does standard Linux crontab support the # syntax natively?

No, standard Vixie or ISC cron used in most Linux distributions does not support the `#` character. You must schedule the job to run every Monday and use a shell condition like `[ $(date +\%d) -le 7 ]` to restrict execution to the first Monday.

How do daylight saving time (DST) shifts affect this monthly schedule?

If your server timezone observes DST, the 9:00 AM execution time will shift relative to UTC. To prevent issues where a job runs twice or is skipped during a transition, configure your cron daemon or orchestrator to run in UTC.

How can I test a job that only runs once a month?

Do not wait for the first Monday to test. Implement a dry-run flag in your application code, or trigger the job manually in your staging environment using a temporary cron schedule like `*/5 * * * *` to verify the execution path.

What is the best way to monitor this highly infrequent job?

Since this job runs only twelve times a year, passive monitoring is insufficient. Use a "dead man's switch" monitor (like Cronitor or Healthchecks.io) that expects a ping at 9:00 AM on the first Monday and alerts if the ping is missed.

* Explore

Related expressions you might need

Was this helpful?

Last verified: