Run Annual Christmas Day Jobs | CronBase

cron expression Standard
$ 0 0 25 12 *

Once a year on Christmas Day exactly at midnight

The `0 0 25 12 *` cron expression schedules a task to execute once a year at exactly midnight on December 25th. This highly specific interval is typically reserved for annual holiday automated tasks, system-wide maintenance during low-traffic periods, or specialized end-of-year data consolidation processes.

Minute
0
Hour
0
Day of Month
25
Month
12
Day of Week
*

Next 5 Runs

  • in 104d 13h
  • in 469d 13h
  • in 835d 13h
  • in 1200d 13h
  • in 1565d 13h

* Tools

Code & Implementations

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

console.log('Initializing annual Christmas scheduler...');

// Schedule for: 0 0 25 12 *
// Minute: 0, Hour: 0, Day of Month: 25, Month: 12 (December), Day of Week: *
cron.schedule('0 0 25 12 *', () => {
  console.log(`[${new Date().toISOString()}] Executing annual Christmas Day routine...`);
  
  exec('/usr/local/bin/christmas-task.sh', (error, stdout, stderr) => {
    if (error) {
      console.error(`[ERROR] Execution failed: ${error.message}`);
      return;
    }
    if (stderr) {
      console.warn(`[WARN] Standard error output: ${stderr}`);
    }
    console.log(`[SUCCESS] Output: ${stdout}`);
  });
}, {
  scheduled: true,
  timezone: "UTC"
});
Setup notes

Install the node-cron package using npm install node-cron. Run this script using a process manager like PM2 to guarantee it remains running throughout the year.

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 25 12 ? *)

Systemd Timer

OnCalendar*-12-25 00:00:00

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

[Timer]
OnCalendar=*-12-25 00:00:00
Persistent=true

[Install]
WantedBy=timers.target

Frequently Asked Questions

What happens if the server is offline exactly at midnight on December 25th?

Standard cron engines do not catch up or retry missed executions automatically. If your server is offline when midnight strikes on December 25th, the job will not run until the following year. To prevent this, use tools like anacron, Kubernetes CronJobs, or external monitoring engines like dead-man's snitches to alert you if the job was skipped.

How can I safely test a cron job scheduled to run only once a year?

Do not wait until Christmas to test this job. You can test the workload by temporarily modifying the cron pattern to a minute-based interval (e.g., `*/5 * * * *`) in a staging environment. Additionally, write unit tests that mock the system clock to December 25th to verify that date-dependent logic behaves correctly.

Does this schedule take daylight saving time (DST) adjustments into account?

Standard Linux system cron runs on the host machine's timezone. In December, most regions are on standard time, not daylight saving time. However, to avoid any unexpected scheduling shifts, it is highly recommended to configure your servers and application schedulers to run strictly in UTC.

Will this job conflict with normal daily backups or server maintenance?

Yes, it can. Because this job runs at midnight, it may collide with daily cron jobs (which also frequently default to midnight). To avoid CPU and database lock-ups, you should offset this holiday job (e.g., to 2:00 AM) or implement database transaction isolation to protect your daily operational pipelines.

How can I trigger this job manually if it fails on Christmas Day?

Your application should expose a secure administrative endpoint, a manual CLI command, or a Kubernetes job trigger (e.g., `kubectl create job --from=cronjob/annual-christmas-job manually-triggered-job`) so that operators can rerun the task manually on December 26th without waiting another year.

* Explore

Related expressions you might need

Was this helpful?

Last verified: