#PM2 / Discord: Restart after a connection lost ?

3 messages · Page 1 of 1 (latest)

inner brook

For context, I host my bot on my Raspberry, at my house. Sometimes, I lost electricity, and the server restart. Obviously, I configured pm2 to restart all… But, obviously, internet return some times after the power's return.
How can I configure pm2 or the bot to restart when internet is regained? For example, trying to connect each 1min until success, maybe?

Thank you!

final depotBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
inner brook

PM2 / Discord: Restart after a connection lost ?