Skip to content

Cron Every Day at Midnight

The cron expression for 'every day at midnight' is `0 0 * * *`. Equivalent shortcuts: `@daily` and `@midnight`. Runs at 00:00 in the server's timezone (usually UTC). Common variations: every day at 3 AM (`0 3 * * *`), every weekday at 9 AM (`0 9 * * 1-5`), every Sunday at 2 AM (`0 2 * * 0`).

When to use this

Use for: daily backup snapshots, end-of-day report generation, daily database vacuum/optimize jobs, daily SSL certificate renewal checks, daily log rotation, daily ETL pipelines.

Frequently Asked Questions

Is server midnight the same as my local midnight?

Usually no. Most cloud servers (AWS, GCP, Azure) default to UTC. If your business operates in IST (UTC+5:30), 'midnight UTC' is 5:30 AM IST. Either set the server timezone to your local one (sometimes recommended for log timestamps), or adjust the cron expression to compensate.

How do I ensure the job doesn't overlap with other midnight jobs?

Stagger them - schedule one at 0 0 * * *, another at 10 0 * * *, another at 20 0 * * *. Or use a job runner / queue system that enforces serialization. Many backup tools run at exactly midnight, leading to load spikes that overwhelm DB / disk.

Powered by Cron Expression Generator.

Other targeted versions of this tool — each tuned for a specific use case.

Or use the main Cron Expression Generator if your use case isn't covered above.