How to Reboot server for every 6 hours ?

Posted August 5, 2015 7.2k views
UbuntuLinux Commands

Does anyone know how to reboot droplet using cron job for every 6 hours ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Just open

# sudo crontab -e

and there you have to make the following new entry (in a new line):

* */6 * * * root /sbin/shutdown -r now


0 */6 * * * root /sbin/shutdown -r now