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
*

Next 5 Runs

  • in 19d 22h
  • in 50d 22h
  • in 80d 22h
  • in 111d 22h
  • in 142d 22h

* Tools

Code & Implementations

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

// Schedule the task to run at 09:00 on day 1 of every month
cron.schedule('0 9 1 * *', async () => {
  console.log(`[${new Date().toISOString()}] Starting monthly billing aggregation...`);
  try {
    await runBillingPipeline();
    console.log(`[${new Date().toISOString()}] Monthly billing completed successfully.`);
  } catch (error) {
    console.error(`[${new Date().toISOString()}] CRITICAL: Monthly billing failed:`, error);
    // Integrate with incident response tooling (e.g., PagerDuty, Opsgenie) here
  }
}, {
  scheduled: true,
  timezone: "UTC"
});

async function runBillingPipeline() {
  return new Promise((resolve) => setTimeout(resolve, 5000));
}
Setup notes

Install the dependency using npm install node-cron. Run this script inside a process manager like PM2 to guarantee continuous execution.

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

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

Was this helpful?

Last verified: