My experience level is low on unbuntu. I install, config and run website. I want to make my ubuntu reboot every 4 hours. from 4 in 4 hours, non stop.
Please tell me the commands i need to send. Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
You can set your server to reboot every 4 hours by setting the following crontab.
First you may want to select your preferred editor otherwise vi maybe a tad too complex for someone just starting. To that first:
Then edit your crontab:
There you can set your server to reboot every 4 hours with the following:
However, you should not have a need to reboot your server every 4 hours. If you are running into that then you have a larger issue that needs to be investigated. Perhaps you have a memory leak, or something else on your server is overloaded.
You should be able to run a server for months without any service interruptions. Technically years, however you will need to reboot for a security update.
I edited file for auto reboot Ubuntu 18 server in every 6 hours. Is that ok?
It’s not working for me, on Ubuntu 18.04…