How to reboot Ubuntu once a month

by

in

It could be a goo idea to reboot the Ubuntu VPS server once a month.
Start the cron editor with the command

sudo crontab -e

Then add the cron command to restart the server

15 15 15 * * root /sbin/shutdown -r now >/dev/null 2>&1

To verify that this works use this command to get the time the server has been up.

sudo uptime -p

This command will tell you when the server was booted

sudo uptime -s