Question

How can I automatically restart my node js server every 4 hours automatically. There is a bug that only shows up after 4 hours and I want to be able to run it through the night. I'm already using forever. Thanks, Arjun

Was it helpful?

Solution

It doesn't sound like you're really solving the problem... But you could use a crob job.

Something like:

0 */4 * * * forever restart <MYSCRIPT.JS>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top