Run Daily Backups and Syncs at 10 PM | CronBase

cron expression Standard
$ 0 22 * * *

Every day in the evening at ten PM

The `0 22 * * *` cron expression triggers a scheduled task every day at exactly 10:00 PM (22:00) in the system's local timezone. It is widely used in production environments for executing nightly database backups, processing daily batch transactions, rotating system logs, and initiating off-peak synchronization tasks before the midnight rollover.

Minute
0
Hour
22
Day of Month
*
Month
*
Day of Week
*
How it works

Next 5 Runs

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

* Tools

Code & Implementations

Bash
# Edit your crontab using: crontab -e
# Standard cron entry to run a backup script at 10:00 PM daily
# Uses flock to prevent overlapping executions and redirects output to a log file
0 22 * * * /usr/bin/flock -n /var/run/daily_backup.lck /usr/local/bin/daily_backup.sh >> /var/log/cron/daily_backup.log 2>&1
Setup notes

Open your user crontab using crontab -e and paste the entry. Ensure the log directory /var/log/cron/ exists and the execution script has run permissions (chmod +x).

Last verified:

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 22 * * ? *)

Systemd Timer

OnCalendar*-*-* 22:00:00

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

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

[Install]
WantedBy=timers.target

Last verified:

Frequently Asked Questions

How does Daylight Saving Time (DST) affect a 10 PM daily cron job?

Depending on your OS timezone database, DST shifts can cause the job to run an hour early or late relative to UTC, or potentially skip/double-execute if transitioning during that hour. Running your system clock on UTC is the industry standard to ensure consistent 24-hour intervals.

Can I run this job only on weekdays instead of every day?

Yes, you can modify the fifth field (day-of-week) to restrict execution. Changing the expression to `0 22 * * 1-5` will run the task at 10 PM Monday through Friday, skipping Saturday and Sunday.

What happens if the server is offline at 10 PM when the job is scheduled?

Standard cron does not catch up on missed executions. If your server is offline at 22:00, the job will not run until 10 PM the following day. For critical tasks, use utilities like anacron or implement a startup check script.

How do I prevent multiple instances of this 10 PM job from overlapping?

Use a locking mechanism like `flock` in Linux, or a distributed lock manager like Redis (Redlock) if running across multiple nodes. This ensures that if the previous day's task is still running, the new instance terminates safely.

Why is my 10 PM cron job running at 5 PM local time?

This discrepancy occurs because your server's system clock is configured to UTC (or a different timezone) rather than your local timezone. Check your system time using the `date` command and adjust either the server timezone or the cron hour accordingly.

* Explore

Related expressions you might need

Last verified:

Was this helpful?