Question

How to Reboot server for every 6 hours ?

Posted August 5, 2015 4k views
Ubuntu Linux Commands

Hi
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.

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

WRONG!!!!

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

Submit an Answer