How does yum-cron work? Is it constantly checking for updates and will download and apply them in real time? How can I configure yum-cron to run only at certain times?
There is this 0yum-daily.cron file inside your /etc/cron.daily/ that is executed daily by your scheduler. It checks for the existence of /var/lock/subsys/yum-cron file. If it doesn’t exist, the cron job just ends. If it does exist, the cron script executes /usr/sbin/yum-cron.
And this /var/lock/subsys/yum-cron file is touched or removed by your yum-cron.service systemd script when you start or stop it respectively.
I have a question about the schedule for apply the updates. for example if i want to apply the updates only at midnight, which will be the best solution to set yum-cron to run in this schedule?
Hi,
you must enable special repository to see the package.
Red Hat Enterprise Linux 7 – rhel-7-server-optional-rpms
Oracle Linux 7 – ol7_x86_64_optional_latest
CentOS 7 – base repository (no special repository required)
Correct me if I’m wrong, but IMO you need to enable yum.cron in the normal manner so as to make sure it restarts if the server reboots: systemctl enable yum-cron.service
I try to find if minimal-security-severity:Critical
will include minimal update + security update + critical update or just update corespond to those 3 criterias
in others words : it is a & or a OR
How does yum-cron work? Is it constantly checking for updates and will download and apply them in real time? How can I configure yum-cron to run only at certain times?
There is this 0yum-daily.cron file inside your /etc/cron.daily/ that is executed daily by your scheduler. It checks for the existence of /var/lock/subsys/yum-cron file. If it doesn’t exist, the cron job just ends. If it does exist, the cron script executes /usr/sbin/yum-cron.
And this /var/lock/subsys/yum-cron file is touched or removed by your yum-cron.service systemd script when you start or stop it respectively.
Hello friend! thanks for the nice post.!
I have a question about the schedule for apply the updates. for example if i want to apply the updates only at midnight, which will be the best solution to set yum-cron to run in this schedule?
thanks!
Copy a version of it to /usr/local/sbin, configure it the way you want, and enable a task in /etc/cron.d to run it specifically at midnight.
OK but my system tells me there is no yum-cron available. How do I get that?
type yum -y install yum-cron
In RHEL7, you can find yum-cron in the rhel-7-server-optional-rpms repository. In CentOS7, it’s in the epel repository.
Hi,
you must enable special repository to see the package.
Red Hat Enterprise Linux 7 – rhel-7-server-optional-rpms
Oracle Linux 7 – ol7_x86_64_optional_latest
CentOS 7 – base repository (no special repository required)
Correct me if I’m wrong, but IMO you need to enable yum.cron in the normal manner so as to make sure it restarts if the server reboots:
systemctl enable yum-cron.service
Hi;
I try to find if minimal-security-severity:Critical
will include minimal update + security update + critical update or just update corespond to those 3 criterias
in others words : it is a & or a OR