I have a CentOS 6 machine that's hosting some non-critical Web applications.
I need it to be up in general, but a weekly late-night reboot won't cause any major business problems.
In order to keep the system up to date I put this in root's crontab...
Code:
6 3 * * * /usr/bin/yum update -y 2>&1 > /home/my_account/log/yum_update.log
So I'm running yum update -y daily there.
My main question -->
Sometimes an update requires a restart.
So to deal with that, I'd like to somehow set up this machine to reboot itself once per week.
What's a good way to do that?(I considered adding a weekly cron job to run shutdown -r now, but I'm not sure if that would work well with a VPS machine.)
I understand many sysadmins would not consider this whole setup in general to be acceptable for a production system.
But I'm just hosting some personal apps and utils here. If an update goes awry and I need to restore from backup, it's ok.
My goal here is to keep this system patched and secure without costing too much of my time and attention which I need for other priorities that actually are critical.
In case it matters, I'll be running Apache, MySQL, and sshd.
Any help or advice would be greatly appreciated.
Thanks!