How to make my node restart every X seconds
By Michael Henderson •
I want to make my node command (node index.js for example) repeat every X hours. I want it to run the commandline node ., then after X hours to exit the process and node it again. Any ideas?
More info (AFTER EDIT):
Ubuntu Server 18.04
11 Answer
You could do it with cron job manual or try a systemd timer service. The latter I've used several times. You'll need to create a service and a corresponding timer for it: A timer ExampleYour script is a service then. So you'd start it with systemctl
1