Run a Cron Job Daily at Midnight
Runs once per day at midnight (00:00).
0 0 * * *Field Breakdown
0Minute
0–59
0Hour
0–23
*Day of Month
1–31
*Month
1–12
*Day of Week
0–6
How It Works
Setting minute and hour to 0 with wildcards elsewhere creates the classic daily midnight job. This is the most common cron schedule for nightly batch processing, backups, log rotation, and report generation. Nearly every production system has at least one daily midnight cron for housekeeping and maintenance tasks.
Both the minute and hour fields are set to 0, pinning execution to exactly 00:00 (midnight). The day-of-month, month, and day-of-week fields are all wildcards, so the job fires once every day without any date restriction. This is the standard "once per day" cron pattern.
Platform Usage
Linux: "0 0 * * * /usr/local/bin/nightly-backup.sh >> /var/log/backup.log 2>&1". Kubernetes CronJob with schedule: "0 0 * * *", often paired with a persistent volume for backup storage. In a CI/CD context, use this for nightly regression test suites or dependency vulnerability scans.
Common Use Cases
Nightly database backups
Log file rotation and archival
Generating daily analytics reports
Cleaning up temporary files and expired sessions
$ crongen --customize "0 0 * * *"
Want to tweak this schedule or see the next run times?
Open in Generator