create account

RE: How to use PM2 to manage your scripts by geekgirl

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @themarkymark/how-to-use-pm2-to-manage-your-scripts

· @geekgirl ·
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?
👍  ,
properties (23)
authorgeekgirl
permlinkpxexku
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2019-09-06 14:00:33
last_update2019-09-06 14:00:33
depth1
children1
last_payout2019-09-13 14:00:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length249
author_reputation1,588,017,852,468,897
root_title"How to use PM2 to manage your scripts"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,310,148
net_rshares11,476,977,166
author_curate_reward""
vote details (2)
@themarkymark · (edited)
`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 a `pm2 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.
👍  
👎  
properties (23)
authorthemarkymark
permlinkpxf5wi
categorylinux
json_metadata{"tags":["linux"],"app":"steemit/0.1"}
created2019-09-06 17:00:24
last_update2019-09-06 17:12:45
depth2
children0
last_payout2019-09-13 17:00:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length441
author_reputation1,779,924,755,374,930
root_title"How to use PM2 to manage your scripts"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id90,315,892
net_rshares11,465,617,884
author_curate_reward""
vote details (2)