cron jobs running twice

Issues related to applications and software problems
Post Reply
mathog
Posts: 47
Joined: 2008/07/09 23:52:06

cron jobs running twice

Post by mathog » 2018/06/26 20:29:53

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.

Thanks,

David Mathog

mathog
Posts: 47
Joined: 2008/07/09 23:52:06

Re: cron jobs running twice

Post by mathog » 2018/06/27 16:17:12

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

/etc/cron.d/dailyjobs
but there were no other changes.

User avatar
TrevorH
Forum Moderator
Posts: 23454
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cron jobs running twice

Post by TrevorH » 2018/06/27 16:27:22

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
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply