You should create a script using the directions given by Kees Cook...
You can just copy and paste the information below in any text editor and create the zz-reboot
file in the directory suggested.
After that just remember to right click on the file and assign it execution permission.
If you feel like doing in using terminal just:
sudo chmod +x /etc/cron.daily/zz-reboot
To understand better what you're doing remember that in /etc
folder you generally find configuration files and there you can find cron.hourly
, cron.daily
and other cron folders.
Cron takes care of executing applications and script at a certain time.
If you want to be strict about the reboot time just digit
sudo crontab -e
so you can edit the crontab
for the root user.
If you feel better doing it graphically you can install from the Software Center gnome-schedule.
If you want to modify the gnome-schedule
for root user ensure that you run it from terminal:
gksudo gnome-schedule
Have fun playing around! :)
p.s.:
great point sBlatt! I was wondering if there's any way to force cron.daily
execution time manually.
crontab -e
andsudo crontab -e
saves the file to a temporary location when you go to exit (e.g. /tmp/crontab.Y88XQl/crontab) and the task does not run. i was forced to edit /etc/crontab directly – wal Jul 21 '19 at 00:32sudo
beforereboot
command in the file opened bysudo crontab -e
in Linux Mint (but I'm not sure if it makes any difference in this case). – kcpr May 06 '20 at 19:050 4 * * * /sbin/shutdown -r +5
is equally to5 4 * * * /sbin/shutdown -r
– Igor Leonovich Jul 23 '23 at 00:55