Cron for Weekly Log Rotation (Sunday Midnight)

Cron expression for weekly log rotation every Sunday at midnight: 0 0 * * 0. Compress and archive logs once per week during the lowest-traffic window.

0
Minute
0
Hour
*
Day (M)
*
Month
0
Weekday

At 12:00 AM, only on Sunday

Next execution dates

  • Sun, Jun 14, 2026, 12:00:00 AMin 3 days
  • Sun, Jun 21, 2026, 12:00:00 AMin 10 days
  • Sun, Jun 28, 2026, 12:00:00 AMin 17 days
  • Sun, Jul 5, 2026, 12:00:00 AMin 24 days
  • Sun, Jul 12, 2026, 12:00:00 AMin 31 days

Visual builder

Pick how often the job should run. The expression updates automatically.

At:

How cron syntax works

A standard cron expression has five fields, separated by spaces.

MinuteHourDay of monthMonthDay of week
0 - 590 - 231 - 311 - 120 - 6 (Sun-Sat)
*
Any value* * * * * — every minute
,
Value list separator0 9,17 * * * — at 9 AM and 5 PM
-
Range of values0 9-17 * * * — every hour 9 AM–5 PM
/
Step values*/15 * * * * — every 15 minutes
?
No specific value (Quartz)0 0 12 ? * MON
L
Last (day of month/week)0 0 L * ? — last day of month

Common cron expressions

Click any example to load and translate it.

When to use this schedule

Log rotation at Sunday midnight gives a full week of logs to archive before compressing. Pair with logrotate or a custom script. For high-volume apps, daily log rotation at midnight may be more appropriate.

Related cron schedules