Schedule Monthly Tasks on the First at 9 AM | CronBase

cron expression Standard
$ 0 9 1 * *

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

This standard cron expression schedules a recurring job to execute precisely at nine AM on the first day of every calendar month. It is commonly utilized in production environments to trigger monthly billing cycles, compile monthly usage reports, clear temporary storage, or initiate major recurring database backups during business hours.

Minute
0
Hour
9
Day of Month
1
Month
*
Day of Week
*
How it works

Next 5 Runs

  • in 6d 12h
  • in 37d 12h
  • in 67d 12h
  • in 98d 12h
  • in 128d 12h

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
# System crontab entry using flock to prevent concurrent executions.
# Ensure the script runs with a lock and redirects output to a structured log file.
0 9 1 * * /usr/bin/flock -n /var/run/monthly_backup.lock /usr/local/bin/monthly_backup.sh >> /var/log/cron/monthly_backup.log 2>&1
Setup notes

Place this entry in your system crontab using crontab -e. Ensure the flock utility is installed and that the target log directory exists with appropriate write permissions.

Last verified:

Partner BetterStack

Monitor this schedule in production

Get alerted the moment this cron job fails, is late, or doesn't run. BetterStack tracks execution, duration, and output — no infrastructure required.

Platform Equivalents

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 9 1 * ? *)

Systemd Timer

OnCalendar*-*-01 09:00:00

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

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

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How does daylight saving time affect a monthly cron running at 9 AM?

If your system timezone is set to a local zone that observes DST, the job will shift relative to UTC. In the spring, it may execute an hour earlier in UTC, and in autumn, an hour later. Running servers on UTC avoids these shifts entirely.

What happens if the server is offline at 9:00 AM on the first of the month?

Standard cron daemons do not catch up on missed executions. If your server is offline during that exact minute, the job will not run until the first of the next month. Use tools like anacron or job schedulers with run-missed flags if high availability is required.

How do I test a monthly cron job without waiting for the first of the month?

You can temporarily change the schedule to run every few minutes (e.g., `*/5 * * * *`) in a staging environment, or trigger the underlying script/container manually. Using tools like `cron-mock` or injecting system times in your test suite are also recommended.

Can I use this expression to generate reports for the previous month safely?

Yes, but you must account for late-arriving data. Running at 9:00 AM gives upstream systems nine hours to finalize day-30 or day-31 data. However, for financial systems, it is safer to query data with an explicit date range limit (e.g., up to midnight of the last day) to avoid including new day-1 data.

How do I prevent duplicate runs if the monthly job takes longer than 24 hours?

While monthly jobs rarely run long enough to overlap with the next month's run, they can overlap with other daily tasks. Use a locking mechanism like `flock` in Bash, a Redis-based distributed lock (Redlock) in microservices, or `concurrencyPolicy: Forbid` in Kubernetes to prevent concurrent executions.

* Explore

Related expressions you might need

Last verified:

Was this helpful?