[英]How to schedule yum-cron to run on Centos Monthly in order to automate monthly server updates
I would like to automate CentOS7 server updates.我想自动化 CentOS7 服务器更新。 According to the internet it is possible by installing yum-cron and editing the /etc/yum/yum-cron.conf
file.根据互联网,可以通过安装 yum-cron 并编辑/etc/yum/yum-cron.conf
文件来实现。 However, I don't see how I can schedule this to run on a monthly basis.但是,我不知道如何安排它每月运行。 I have tried scheduling it in anacrontab, but it does not seem to work(nothing happens).我曾尝试在 anacrontab 中安排它,但它似乎不起作用(没有任何反应)。 The only time it appears to work is when I add the same settings in the /etc/cron.daily/0yum-daily.cron
file, but again not sure on how to get this to run monthly instead of daily.它似乎工作的唯一一次是当我在/etc/cron.daily/0yum-daily.cron
文件中添加相同的设置时,但再次不确定如何让它每月而不是每天运行。 If I need to alter crontab what would be the command to run yum-cron once a month?如果我需要更改 crontab,每月运行一次 yum-cron 的命令是什么?
You can add settings inside directory /etc/cron.monthly/
您可以在目录/etc/cron.monthly/
中添加设置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.