Edit crontab:
sudo crontab -e
The first time you might have to choose your preferred editor (like vim).
0 4 * * * /sbin/shutdown -r +5
It would reboot your system every day at 4:05am. (4:00am + 5 minutes).
Finally, restart crontab service:
sudo systemctl restart cron
Reference:
https://askubuntu.com/questions/13730/how-can-i-schedule-a-nightly-reboot
Leave a Reply