pm2
pm2 copied to clipboard
pm2 save without starting first
Hi,
We want to be able to pm2 save a state without first being in that state.
So if we have a file processes.json, we want to start all the processes listed there but only after a reboot.
Today we do:
pm2 start processes.json
pm2 save
but that causes the processes to run before we have time to reboot the server.
Any chance to do something like
pm2 save processes.json which will save the "future" state of those processes? or just start them after the reboot?
You should be able to start the processes.json and do a pm2 save only once (after the process is save until you re-execute a pm2 save), should be good enough no ?
But I don't want the processes to start now, I want to to start after a reboot
+1
This is something I also have been trying to do. A suggestion: pm2 create which would have the same arguments as pm2 start but not actually start the process.
+1
+1
+1
I'm going through the issues to find mentions about not auto-starting a new process, which I now created a PR for: #5780