I have an entry in my crontab file:
14 17 * * */2 python /home/pi/scripts/irrigate_5mins.py >/dev/null 2>&1
The intention is to run the command every other day, which is what the manpage (
man 5 crontab) says is what
*/2 does. The actual quote from the manpage is:
Steps are also permitted after an asterisk, so if you want to say ``every two hours'', just use ``*/2''
The actual behaviour is that the command runs with a recurrence pattern of 2, 2, 2, 1, 2, 2, 2, 1 and so on. So, for example, in March / April the command ran on 15th, 17th, 18th, 20th, 22nd, 24th, 25th, 27th, 29th, 31st, 1st April, 3rd, 5th, 7th, 8th, 10th, 12th, where the dates in bold are those where the command was run the previous day.
So my question is: why is it behaving like this, and is there an (easy) way I can make it do what is expected?
root@pi:~# uname -a Linux pi 4.9.28+ #998 Mon May 15 16:50:35 BST 2017 armv6l GNU/Linux root@pi:~# lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie
It may or may not be of relevance that the system is connected to a timer which causes a hard reboot every 24 hours.