crontab to check for updates on Redhat or Centos

This is the entry we use to check for updates everynight. If updates are available it will download them and send email so you can just jump on machine and do yum update -y

6 5 * * * /usr/bin/yum -q check-update > /etc/motd 2>&1 || /usr/bin/yum upgrade -y –downloadonly | mailx -s “yum updates on `uname -n`”

This entry was posted in Uncategorized. Bookmark the permalink.