All Cron Schedules
Cron Daily at 4 AM
Run a cron job every day at 4:00 AM:
0 4 * * *
Understanding the Expression
The cron expression 0 4 * * * breaks down as follows:
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 |
| Hour | 4 | At 4:00 |
| Day of month | * | Every day of the month |
| Month | * | Every month |
| Day of week | * | Every day of the week |
Example Usage
Basic crontab entry
0 4 * * * /path/to/your/script.sh
With output logging
0 4 * * * /path/to/script.sh >> /var/log/script.log 2>&1
With monitoring
0 4 * * * /path/to/script.sh && curl -fsS https://cronsignal.io/ping/YOUR_CHECK_ID
Common Use Cases for Daily at 4 AM
- Database backups: Create daily database snapshots
- Log rotation: Archive and compress old log files
- Daily reports: Generate and email daily summary reports
- Data aggregation: Compile daily statistics and metrics
Platform Equivalents
The same schedule expressed across common platforms and schedulers:
| Platform | Syntax |
|---|---|
| Linux crontab | 0 4 * * * |
| GitHub Actions | - cron: '0 4 * * *' |
| systemd timer | OnCalendar=*-*-* 04:00:00 |
| Kubernetes CronJob | schedule: "0 4 * * *" |
| AWS EventBridge | cron(0 4 * * ? *) |
Timezone Considerations
4 AM UTC equals 11 PM EST or 8 PM PST. A classic off-peak maintenance window. For 4 AM local EST, use 0 9 * * * UTC.
Common Mistakes
- Cloud maintenance overlap: Many providers run maintenance between 2-6 AM UTC. Add retry logic for critical tasks.
- Database backup contention: 4 AM UTC is a popular backup window. Check for lock contention if your job touches a database.
- Verify runtime before business hours: A 4 AM job taking 6 hours still runs at 10 AM UTC. Profile runtime and alert on overruns.
Monitor this schedule
Get alerted when your cron job doesn't run.
Sign up with Google
or
3 checks free. No credit card required.