问题
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
回答1:
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>
来源:https://stackoverflow.com/questions/19779820/automatically-restart-node-server