I have a
cron script that runs a few times every day throughout the year. However, around Christmas it should work differently. So my script looks basically like this:
# m h dom mon dow command 26 16 * JAN-NOV MON-THU (echo 14 `date`) >> /var/log/cron.www-data 2>&1 26 16 1-18 DEC MON-THU (echo 6 `date`) >> /var/log/cron.www-data 2>&1
where I replaced the actual command with a simple
echo for debugging / demonstration purposes.
For the exceptional case, I added some jobs like
26 07 19-24 DEC ? (echo 1 `date` ) >> /var/log/cron.www-data 2>&1
that actually work fine.
The problem is, that the second line above (
echo 6) just got run, today December 19 -- the log file shows
6 Tue Dec 19 16:00:01 CET 2017
I guess my question is simply: Why did this job run?
I'm running Linux 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux on a Raspberry Pi.