Page 1 of 1

cron jobs running twice

Posted: 2018/06/26 20:29:53
by mathog
Centos 6.9.

I just noticed that the reason a backup tape was filling faster than usual was that the cron job for it had started running twice a day. The /etc/crontab file with a single cron.daily entry dates back to 1/30/2017, which is when the machine was originally set up. However the /etc/cron.d/dailyjobs file now also contains a cron.daily entry, and that file came in on 4/10/2018 with cronie-noanacron-1.4.11-19.el7.x86_64.

My fix, at least for now, was to modify the /etc/cron.d/dailyjobs file and to rename /etc/crontabs to /etc/old_crontabs to take it out of the loop.

Anybody know what the "approved" method of setting this up so that the next cron update doesn't step on the configuration again? I'm hoping that with the current setup the yum based auto installation will see the modified dailyjobs file and not replace it.


David Mathog

Re: cron jobs running twice

Posted: 2018/06/27 16:17:12
by mathog
A diff of a backup of /etc/cron.d versus the current one shows that some automatically installed version of cron added

Code: Select all

but there were no other changes.

Re: cron jobs running twice

Posted: 2018/06/27 16:27:22
by TrevorH

Code: Select all

# yum provides '/etc/cron.d/dailyjobs'
Loaded plugins: priorities
692 packages excluded due to repository priority protections
cronie-noanacron-1.4.11-19.el7.x86_64 : Utility for running simple regular jobs in old cron style
Repo        : base
Matched from:
Filename    : /etc/cron.d/dailyjobs