Cron Every Night at 3 AM
Set up a cron job that runs every night at 3 AM with the expression 0 3 * * *. Detailed field breakdown and tips for scheduling nightly tasks.
Cron Expression
0 3 * * *
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | 3 | At 3 |
| Day of Month | * | Every day of the month (1–31) |
| Month | * | Every month (1–12) |
| Day of Week | * | Every day of the week (Sun–Sat) |
Detailed Explanation
The cron expression 0 3 * * * schedules a task to run once per day at exactly 3:00 AM.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the top of the hour.3(Hour): At hour 3 (3 AM). The task is restricted to the 3 AM hour, deep in the off-peak overnight window.*(Day of Month): Every day from 1 through 31. No restriction on the day of the month.*(Month): Every month from January through December. No restriction on which month.*(Day of Week): Every day of the week from Sunday through Saturday. No restriction on the day of the week.
This means your task will execute once per day at 3:00 AM server time. The 3 AM slot is excellent for heavy batch processing because it avoids the 2 AM daylight saving time transition issues that affect many time zones (since clocks jump from 2 AM to 3 AM, 3 AM always exists during spring forward). It also provides sufficient distance from both midnight cleanup jobs and early-morning pre-business-hours preparation tasks. If your nightly job takes a long time to run, scheduling at 3 AM gives it several hours to complete before business hours begin. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Great for running nightly ETL (Extract, Transform, Load) pipelines that process the previous day's data and prepare analytics reports for the morning.
Try It — Interactive Builder
Every day at 3:00 AM
Next 10 Executions
Ctrl+Shift+C to copy expression