We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a service that should do some cleanup before stopping.
This way runs successful:
pm2 start service.js --kill-timeout 10000 --shutdown-with-message
pm2 stop all
But if instead of point 4 I stop the service with net stop pm2.exe, no message is sent to my service.
net stop pm2.exe
In the service I use this to catch the message:
process.on('message', msg => { if (msg === 'shutdown') { console.log('shutdown'); } });
Is there another way to do this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I have a service that should do some cleanup before stopping.
This way runs successful:
pm2 start service.js --kill-timeout 10000 --shutdown-with-message
pm2 stop all
But if instead of point 4 I stop the service with
net stop pm2.exe
, no message is sent to my service.In the service I use this to catch the message:
Is there another way to do this?
The text was updated successfully, but these errors were encountered: