⏱OpsTools

Cron Expression for Daily at 2 AM

0 2 * * *→Runs once a day at 02:00
0
Minute
0–59
2
Hour
0–23
*
Day
1–31
*
Month
1–12
*
Weekday
0–7

Quick Examples

How It Works

The expression 0 2 * * * fires at 2:00 AM every day. This time slot is popular for heavy-duty operations like full database backups, data warehouse loads, or system updates, because 2 AM is typically the lowest-traffic period. It avoids the 'midnight rush' where many cron jobs compete for resources.

Common Use Cases

  • 1Full database dump / pg_dumpall
  • 2Data warehouse nightly ETL load
  • 3System package updates (apt upgrade, yum update)

Linux Crontab Example

0 2 * * * pg_dumpall -U postgres > /backups/full_$(date +\%F).sql

Add this line to your crontab with crontab -e

Need a custom schedule?

Build your own cron expression visually with our generator.

Open Generator →