1

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

1
  • 1
    Done @K7AAY. Added extra info. – Lmao 123 May 26 '20 at 18:42
1

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 Example Your script is a service then. So you'd start it with systemctl

1
  • Oh are there any videos that can help me out through this? I'm pretty new to ubuntu-linux. – Lmao 123 May 26 '20 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.