Restarting droplet/server automatically daily?

  • Posted on July 17, 2014
  • me237141Asked by me237141

Hi, Is it possible to have my droplet/server restart daily at a certain time? Then once restarted, either have it login automatically or run a command to run an application automatically? The reason why I need to do this is because I have an application running and after some time it starts to lag, and until I restart the droplet, it will lag and lag.

The command I need my droplet to run after restarting is something like : sudo screen ./ -parameters -parameters -parameters

I’m not sure if I could run that command without having to SSH into my droplet.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I was unable to get the crontab working too.

I run crontab -e using sudo

Hi, thank you for that post, I tried the first method, which is : crontab -e Then put0 0 * * * rebootat the end and then

@reboot screen ./ -parameters -parameters -parameters

And lastly

update-rc.d cron defaults

For some reason my system does not reboot at midnight. It also doesn’t runt he command when I reboot it myself. I use the command sudo reboot now but my system doesn’t actually turn off.