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
How it works

Next 5 Runs

  • in 1d 12h
  • in 8d 12h
  • in 15d 12h
  • in 22d 12h
  • in 29d 12h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
set -euo pipefail

# Since standard Vixie cron does not support the '#' symbol natively,
# we schedule the cron job to run every Monday at 9:00 AM:
# 0 9 * * 1 /path/to/wrapper.sh
# Inside the script, we verify if the current day of the month is 7 or less.

CURRENT_DAY=$(date +%-d)

if [ "$CURRENT_DAY" -le 7 ]; then
    echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Info: First Monday detected. Executing production task..."
    # Place your actual production command or script invocation here
    /usr/local/bin/run-monthly-reports.sh
else
    echo "[$(date -u +'%Y-%m-%dT%H:%M:%SZ')] Info: Today is day $CURRENT_DAY of the month. Skipping run."
    exit 0
fi
Setup notes

Save this script to your server, make it executable with chmod +x, and register it in your crontab using 0 9 * * 1 /path/to/script.sh to emulate the first-Monday-of-the-month behavior reliably.

Last verified:

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

Last verified:

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

Last verified:

Was this helpful?