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
*
How it works

Next 5 Runs

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

* Tools

Code & Implementations

Bash
#!/usr/bin/env bash
# Installs a cron job to run a backup script daily at 1:00 AM
set -euo pipefail

CRON_ENTRY="0 1 * * * /usr/local/bin/backup-db.sh >> /var/log/db-backup.log 2>&1"

# Safely append to crontab without duplicates
(crontab -l 2>/dev/null | grep -Fv "/usr/local/bin/backup-db.sh"; echo "$CRON_ENTRY") | crontab -

echo "Successfully scheduled daily backup job at 1:00 AM."
Setup notes

Save this script as setup-cron.sh, make it executable using chmod +x setup-cron.sh, and run it. Ensure that /usr/local/bin/backup-db.sh exists and is executable.

Last verified:

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

Last verified:

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

Last verified:

Was this helpful?