Cron Expression
0 0 * * 0
Learn how to create a cron expression for 'cron every sunday'. Runs every Sunday at midnight with our free cron generator tool.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At minute 0 |
| Hour | 0 | At hour 0 |
| Day of Month | * | Any day |
| Month | * | Any month |
| Day of Week | 0 | Sunday |
This cron expression represents: cron every sunday
0 0 * * 0
Runs every Sunday at midnight. The final field is the day of week, where 0 means Sunday. Most cron implementations also accept 7 for Sunday, and the name form SUN works too — 0 0 * * SUN is equivalent.
Sunday is typically the lowest-traffic day of the week, making this ideal for:
VACUUM FULL or table optimizationcrontab -e
0 0 * * 0 /path/to/your/script.sh
0 0 * * SUN /path/to/script.sh
0 3 * * 0 /path/to/script.sh
0 0 * * 0 /path/to/script.sh >> /var/log/cron.log 2>&1