I'm seeing strange cron behavior which I'm not sure how to debug and fix.
It ignores changes to /etc/crontab
until restarted, e.g. I edit /etc/crontab
adding
* * * * * root echo 'weee' > /tmp/stupidcron
to it.
Then:
root@linux-plba:~# sleep 270 && ls /tmp/stupidcron
ls: cannot access /tmp/stupidcron: No such file or directory
Anything added with crontab
utility works.
If I restart cron, the change is picked up, but any latter changes are not until the next restart.
I have root mail redirected to my inbox, and there's nothing of interest there. I also don't see anything in syslog.
Closest thing to this I've found is this old thread in FreeBSD mailing list:
http://lists.freebsd.org/pipermail/freebsd-questions/2010-September/221179.html
The cron is Vixie cron 4.1-194.209.1 x86-64
Probably, someone have seen such behavior or knows how to further debug/fix it?
P.S. I did read the community wiki on it: Why is my crontab not working, and how can I troubleshoot it? and I believe this case is not covered there.
Best Answer
OK, it seems like this question has no actual answer.
My colleague decided to downgrade cron and see what happens, and it worked just fine.
So he looked through spec files in SRPMs for older and newer versions and it seems to be one of patches breaking cron:
* Wed Aug 6 2014 tchvatal@suse.com - Fix cron man page being ambiguous bnc#853010: * bnc#853010-manpage-ambiguous.patch - Fix wrong mtime when reruning cron scripts bnc#879734: * bnc#879734-directory-mtime.patch
Since the trace shows cron does stat the file and the struct it gets is correct, it's the cron issue, not something misconfigured/permissions problem etc.