Page 1 of 1

Reboot VPS Everyday using Cron

Posted: Mon Jan 09, 2017 9:47 am
by arnlweb
How to reboot VPS server everyday using cron?

Edit crontab:

Code: Select all

sudo crontab -e
Choose an editor (like nano), if you are doing this first time.

Insert a line like at end of the cron file

Code: Select all

0 3   *   *   *    /sbin/shutdown -r +5
Minute(0) Hour(3) DayOfMonth(*) Month(*) DayOfWeek(*) CommandToRun(/sbin/shutdown -r +5)

It would reboot your VPS server everyday at 3:05am. (3:00am + 5 minutes)