I want to restart nodemon server app.js programmatically every 20 minutes with restart.js.
I'm starting with nodemon -r esm app.js. and server.js should relaunch it somehow.
I tried with pm2 and forever various combinations I don't even remember since none of them worked.
You can use forever-monitor and setInterval
to terminate the child and create a new one each X time you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.