I was using tmux. PM2 looks like this is a better solution for me since my scripts tend to fail a lot. I really like the auto-restart feature.
Just to clarify, does pm2 save
work as an auto-restart when script stops working due to various errors?
I was using tmux. PM2 looks like this is a better solution for me since my scripts tend to fail a lot. I really like the auto-restart feature.
Just to clarify, does pm2 save
work as an auto-restart when script stops working due to various errors?
pm2 save
saves the current state of your scripts. You might have some scripts handled under pm2 but stopped and some running. It will keep track of that for you and upon reboot, they will be in the same state.pm2 save
has nothing to do with auto-restart, that will happen automatically after doing apm2 start
I use tmux a lot as well for single processes. It's a shame it isn't as easy to log as screen but I like it far better.