Skip to content
New issue

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

pm2 save without starting first #2504

Closed
shaharmor opened this issue Nov 9, 2016 · 9 comments
Closed

pm2 save without starting first #2504

shaharmor opened this issue Nov 9, 2016 · 9 comments

Comments

@shaharmor
Copy link
Contributor

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?

@vmarchaud
Copy link
Contributor

vmarchaud commented Nov 9, 2016

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 ?

@shaharmor
Copy link
Contributor Author

But I don't want the processes to start now, I want to to start after a reboot

@xtramath
Copy link

+1

@sa-0001
Copy link

sa-0001 commented Mar 2, 2018

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.

@lspiehler
Copy link

+1

2 similar comments
@mz8i
Copy link

mz8i commented Oct 23, 2018

+1

@bitflut
Copy link

bitflut commented Apr 3, 2019

+1

@ultimate-tester
Copy link
Contributor

ultimate-tester commented Mar 8, 2024

I'm going through the issues to find mentions about not auto-starting a new process, which I now created a PR for:
#5780

@Unitech
Copy link
Owner

Unitech commented May 24, 2024

Feature landed

Update PM2 to 5.4.0

$ npm install pm2@5.4.0 -g
$ pm2 update

@Unitech Unitech closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants