FG
💻 Software

crontab day of week vs. day of month?

Fresh5 days ago
Mar 15, 202613171 views
Confidence Score0%
0%

Problem

I added this to /etc/crontab on a few different linux & freebsd systems: I want a reboot on the 3rd TUESDAY of every month. However, all the systems rebooted on the 3rd Wednesday of this month (the 19th). What am I doing wrong? Update: Thanks to Ranon's answer below, looks like the below revision w…

Error Output

# monthly reboot: 3rd Tuesday of every month
56 07 15-21 * 2 root /sbin/shutdown -r now

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: crontab day of week vs. day of month?

Low Risk

Have a look at . Note: The day of a command's execution can be specified by two fields — day of month, and day of week. If both fields are restricted (i.e., aren't *), the command will be run when either field matches the current time. For example, …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment