This article describes how to schedule reboots in the Ubuntu® operating system.
https://docs.rackspace.com/docs/schedule-reboots-in-the-ubuntu-operating-system
Schedule a reboot by using crontab
crontab
Suppose you want to reboot the server at 2:05 am every day. Perform the following steps,
adjusting the details to fit your requirements:
Use the following command to edit the crontab file:
$ sudo crontab -e
To enter insert mode and add a new line at the end of the file, move the cursor to the last line and press the letter o.
In the blank line, add the following line to the file to set the desired daily execution time and command to execute:
05 02 * * * /sbin/shutdown -r +5
Press Esc to exit insert mode and then enter :wq to save the file and quit
crontab
.
Crontab
example:
Crontab
example:The following example shows the possible values for each element of a line in crontab
.
Note: Rebooting your server periodically might be a temporary fix. Troubleshoot the actual issue instead of
relying on a server re-boot to mask the issue.
Tidak ada komentar:
Posting Komentar