Questions About Yum-cron

Home » CentOS » Questions About Yum-cron
CentOS 1 Comment

Hi,

Up until now I always kept my servers up-to-date manually. Currently I’m experimenting with yum-cron to automate this process.

I read through various online tutorials, and now I have a couple questions.

1. As far as I know, when editing /etc/yum/yum-cron.conf, I can only use the following value for update_cmd :

update_cmd = default

If I understand this correctly, ‘update_cmd = security’ would have no effect, since contrary to RHEL, CentOS doesn’t provide the necessary metadata to operate the distinction between security updates and other updates like mere bugfixes. Please correct me if I’m wrong.

2. It looks like editing /etc/yum/yum-cron.conf affects a *daily*
operation of yum-cron, whereas editing /etc/yum/yum-cron-
hourly.conf provides hourly operations. The documentation is not very clear about this, and I’m a little confused here. In other words, yum-cron.conf affects /etc/cron.daily/0yum-daily.cron, and yum-cron-hourly.conf affects /etc/cron.hourly/0yum-hourly.cron.

I only really need yum-cron to run once a day, which would be sufficient. That being said, I can’t figure out at what time it launches. All my users are in France, so ideally the daily yum-cron should be launched somewhere between 04:00 and 05:00 AM, since updating a package like httpd would restart the corresponding processes and kick online users out. I can’t seem to figure out a way to define the exact time at which the daily yum-cron is being launched, since this doesn’t seem to be controlled by standard crontab.

Any suggestions ?

Niki


Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : info@microlinux.fr Tél. : 04 66 63 10 32

One thought on - Questions About Yum-cron

  • Yes. All the cron scripts do is to execute yum-cron with an optional config script as an argument; if no config file is given, it uses the default (/etc/yum/yum-cron.conf). ‘man yum-cron’ tells you this.

    The hourly version (in the default install) does nothing other than update the caches.

    The scripts in /etc/cron.daily are run via anacron with a configuration file of /etc/anacrontab. The exact time the jobs are run are not specified and are variable depending on what the machine is doing (and a random delay). But you can impose time limits on when the jobs can be executed.

    cron.hourly is different and executed via the normal cron system
    (config is in /etc/cron.d/0hourly)

    P.