How to Schedule Daily Tasks at 1:00 AM | CronBase

cron expression Standard
$ 0 1 * * *

Every day at one AM in the morning.

The `0 1 * * *` cron expression triggers a scheduled task once every day at exactly 1:00 AM. It is widely used in production environments for low-traffic operations such as database backups, log rotation, data archiving, and cache clearing to minimize performance impacts on active users.

Minute
0
Hour
1
Day of Month
*
Month
*
Day of Week
*

Next 5 Runs

  • in 15h 3m
  • in 1d 15h
  • in 2d 15h
  • in 3d 15h
  • in 4d 15h

* Tools

Code & Implementations

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

// Schedule task to run daily at 1:00 AM in UTC timezone
cron.schedule('0 1 * * *', () => {
  console.log('Starting daily maintenance job at 1:00 AM...');
  exec('/usr/local/bin/daily-cleanup.sh', (error, stdout, stderr) => {
    if (error) {
      console.error(`Execution error: ${error.message}`);
      return;
    }
    if (stderr) {
      console.error(`Stderr output: ${stderr}`);
    }
    console.log(`Stdout output: ${stdout}`);
  });
}, {
  scheduled: true,
  timezone: "UTC"
});
Setup notes

Install node-cron via npm (npm install node-cron) and run this script using Node.js to keep a long-running scheduling process active.

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

AWS EventBridge

Standard cron expressions often need conversion for AWS EventBridge schedules.

EventBridge Rule
cron(0 1 * * ? *)

Systemd Timer

OnCalendar*-*-* 01:00:00

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

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

[Install]
WantedBy=timers.target

Frequently Asked Questions

How does Daylight Saving Time affect a 1:00 AM cron schedule?

When using local time zones with Daylight Saving Time, the 1:00 AM hour can execute twice during the autumn transition (when clocks roll back from 2:00 AM to 1:00 AM). To prevent duplicate runs or missed executions during spring transitions, configure your server and cron daemon to use Coordinated Universal Time (UTC).

What happens if my daily 1:00 AM backup task overlaps with another cron job?

Running multiple heavy resource-intensive jobs simultaneously at 1:00 AM can cause CPU exhaustion and disk I/O bottlenecks. It is highly recommended to stagger your cron schedules (e.g., placing secondary tasks at 1:15 AM or 1:30 AM) or use a task queue to serialize execution.

Is it possible to run a job at 1:00 AM only on business days?

Yes, you can modify the day-of-week field (the fifth field) to target weekdays only. Changing the expression to `0 1 * * 1-5` will restrict the execution of your task to Monday through Friday at 1:00 AM, skipping weekend executions entirely.

How can I prevent a long-running 1:00 AM task from spawning a duplicate instance?

To prevent overlapping executions of a long-running job, wrap your command with a locking utility such as `flock` in Linux, or implement a distributed locking mechanism (like Redis-based Redlock) in your application code to ensure mutual exclusion.

How do I capture and monitor the output of a cron job scheduled at 1:00 AM?

You should redirect both standard output (stdout) and standard error (stderr) to a persistent log file or external log aggregator. For example, appending `>> /var/log/myjob.log 2>&1` to your crontab entry ensures all runtime information is captured for debugging.

* Explore

Related expressions you might need

Was this helpful?

Last verified: