2

I installed yum-cron on my CentOS 7 VM, but decided I did not need it to run hourly. So I tried to rename, and later completely remove, /etc/cron.hourly/0yum-hourly and /etc/yum/yum-cron-hourly.conf. However, for weeks now I've been getting the following emails hourly:

/etc/cron.hourly/0yum-hourly.cron.old:

Error reading config file: /etc/yum/yum-cron-hourly.conf

Except I have guaranteed that the file /etc/cron.hourly/0yum-hourly.cron.old no longer exists, in any form or by any name; the file has been deleted. I have restarted the crond and yum-cron services, yet the problem persists. Why (or perhaps more importantly, how) does cron keep insisting on running a job that no longer exists?

0
0

You did not delete 0yum-hourly.cron; you renamed it to an .old file that is still being executed.

Any scripts under /etc/cron.hourly will be executed hourly, so you have to remove the file or move it to a backup directory for cron to stop executing it.

1
  • 1
    From my original post: "I have guaranteed that the file /etc/cron.hourly/0yum-hourly.cron.old no longer exists; the only places any 0yum* file exists is in cron.daily, and my home directory." The file has been deleted.
    – ionothanus
    Jun 1 '18 at 1:21
0

You said that you deleted (or in the case of the latter, possibly renamed) the files:

0yum-hourly.cron.old 
yum-cron-hourly.conf

Your error message says:

/etc/cron.hourly/0yum-hourly.cron.old:
Error reading config file: /etc/yum/yum-cron-hourly.conf

From what I can surmise, the yum-cron service is still running but the conf file either doesn't exist or is named something else.

You will either need to stop the service or restore /etc/yum/yum-cron-hourly.conf. If you don't need yum-cron anymore then you can just uninstall it after stopping the service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.