Quarterly Midnight Cron Job on the 15th | CronBase

cron expression Standard
$ 0 0 15 */3 *

At midnight on the fifteenth day of every third month.

The `0 0 15 */3 *` cron expression schedules a task to run at midnight (00:00) on the 15th day of every third month. This quarterly cycle typically triggers in January, April, July, and October, making it ideal for seasonal maintenance, financial reporting, and long-term log archiving.

Minute
0
Hour
0
Day of Month
15
Month
*/3
Day of Week
*

Next 5 Runs

  • in 33d 13h
  • in 125d 13h
  • in 215d 13h
  • in 306d 13h
  • in 398d 13h

* Tools

Code & Implementations

nodejs
const cron = require('node-cron');
const { exec } = require('child_process');

// Schedule task to run at 00:00 on day 15 of every 3rd month
cron.schedule('0 0 15 */3 *', () => {
  console.log('[INFO] Triggering quarterly database archiving task...');
  
  exec('/usr/local/bin/archive-quarterly-data.sh', (error, stdout, stderr) => {
    if (error) {
      console.error(`[ERROR] Execution failed: ${error.message}`);
      return;
    }
    if (stderr) {
      console.warn(`[WARN] Process stderr: ${stderr}`);
    }
    console.log(`[SUCCESS] Output: ${stdout}`);
  });
}, {
  scheduled: true,
  timezone: "UTC"
});
Setup notes

Install the dependency using npm install node-cron. Ensure the Node.js process is managed by a process manager like PM2 to keep it alive perpetually.

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 0 15 */3 ? *)

Systemd Timer

OnCalendar*-00/3-15 00:00:00

my-task.timer
[Unit]
Description=Timer for cron expression: 0 0 15 */3 *

[Timer]
OnCalendar=*-00/3-15 00:00:00
Persistent=true

[Install]
WantedBy=timers.target

Frequently Asked Questions

Which months exactly does this cron expression run in?

Standard cron engines evaluate `*/3` starting from the first month of the year. Therefore, this schedule executes on the 15th of January, April, July, and October.

What happens if the system is offline at midnight on the 15th?

Standard cron will skip the execution entirely. For critical quarterly tasks, you should integrate an orchestrator like Anacron, or design your application to check the last run timestamp upon startup and trigger missed executions.

How do timezone changes or Daylight Saving Time affect this job?

Running at exactly midnight (00:00) is generally safe from DST skips, but fallback transitions can cause double executions in autumn. To prevent this, configure your system clock or container runtime to run in Coordinated Universal Time (UTC).

Can I use this schedule for quarterly financial reporting tasks?

Yes, this is a standard cadence for quarterly reports. However, because it runs on the 15th, ensure that all transaction data from the previous quarter has been fully reconciled and closed before the job begins.

How should I handle failures for a job that runs so infrequently?

Because this job only triggers four times a year, failure visibility is critical. Implement structured logging, external health checks (like Dead Man's Snitches), and configure immediate alerting via Slack, PagerDuty, or email upon failure.

* Explore

Related expressions you might need

Was this helpful?

Last verified: