I want to make a crontab entry which will run on every weekday except the 1st, 2nd, and 3rd of each month. Here's what I have:
45 8,12,16 4-31 * 1-5 my_program
I thought that this had the following meaning:
minutes: 45 past the hour
hours: 8, 12, and 16
day of month: 4th to 31st inclusive
month: all
day of week: Monday to Friday inclusive
That is what I read in the crontab(5)
manual page. However, I can see that the job ran at 08:45 today, Monday 2nd October. I am certain the crontab file was loaded correctly (and crontab -l
shows it); it wasn't changed recently. The system date and time as shown by date
is also correct.
What am I missing to make sure my cron job only runs from the 4th onwards? I am using Fedora Linux:
% rpm -qf `which crontab`
cronie-1.5.0-3.fc23.x86_64
% rpm -q fedora-release
fedora-release-23-1.noarch