Run a Cron Job Every Sunday
Runs at midnight every Sunday.
0 0 * * 0Field Breakdown
0Minute
0–59
0Hour
0–23
*Day of Month
1–31
*Month
1–12
0Day of Week
0–6
How It Works
Setting day-of-week to 0 (Sunday) with hour and minute at 0 creates a weekly schedule. Weekly crons are standard for maintenance windows, summary reports, and cleanup routines that do not need to run daily. Sunday midnight is the most common choice because it falls during the lowest-traffic period for most services.
The minute and hour are both 0 (midnight), and the day-of-week is set to 0, which represents Sunday in standard cron. Day-of-month and month are wildcards. The job fires once per week, specifically at the transition from Saturday night to Sunday morning. Some cron implementations also accept 7 for Sunday.
Platform Usage
Linux: "0 0 * * 0 /opt/maintenance/weekly-cleanup.sh". Kubernetes CronJob with schedule: "0 0 * * 0" and successfulJobsHistoryLimit: 4 to keep the last month of job history. In GitLab CI, configure a pipeline schedule with this cron expression for weekly security scans.
Common Use Cases
Weekly database maintenance and optimization
Sending weekly summary reports
Running full system backups
Cleaning up old logs and temp data
$ crongen --customize "0 0 * * 0"
Want to tweak this schedule or see the next run times?
Open in Generator