Viewing a response to: @themarkymark/how-to-use-pm2-to-manage-your-scripts
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?
author | geekgirl |
---|---|
permlink | pxexku |
category | linux |
json_metadata | {"tags":["linux"],"app":"steemit/0.1"} |
created | 2019-09-06 14:00:33 |
last_update | 2019-09-06 14:00:33 |
depth | 1 |
children | 1 |
last_payout | 2019-09-13 14:00:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 249 |
author_reputation | 1,588,017,852,468,897 |
root_title | "How to use PM2 to manage your scripts" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 90,310,148 |
net_rshares | 11,476,977,166 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
shammi | 0 | 0 | 2% | ||
enforcer48 | 0 | 11,476,977,166 | 5% |
`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.
author | themarkymark |
---|---|
permlink | pxf5wi |
category | linux |
json_metadata | {"tags":["linux"],"app":"steemit/0.1"} |
created | 2019-09-06 17:00:24 |
last_update | 2019-09-06 17:12:45 |
depth | 2 |
children | 0 |
last_payout | 2019-09-13 17:00:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 441 |
author_reputation | 1,779,924,755,374,930 |
root_title | "How to use PM2 to manage your scripts" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 90,315,892 |
net_rshares | 11,465,617,884 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
supera244 | 0 | 0 | -100% | ||
enforcer48 | 0 | 11,465,617,884 | 5% |