How to reboot your Ubuntu Server Everyday?

Linux Server Management Tips and Tricks
Post Reply
arnlweb
Site Admin
Posts: 92
Joined: Wed Jun 22, 2016 1:28 pm
Location: India
Contact:

How to reboot your Ubuntu Server Everyday?

Post by arnlweb » Mon Sep 04, 2017 10:58 am

Reboot server at 3:00am + 5 minutes everyday.

Edit crontab:

Code: Select all

sudo crontab -e
Add this line and save the file:

Code: Select all

0 3   *   *   *    /sbin/shutdown -r +5
Remember: use crontab -e as root, because shutdown needs root permission.

Thanks.

Post Reply