Keep the python script alive

0

Hello,

I launched a lightsail instance and ran a python script. I connected to lightsail via Aws ssh client (I think it was another Chrome tab). I want python script to be continuously running even if internet is disconnected.

How do I do that?

Thanks.

demandé il y a 2 ans597 vues
1 réponse
2
Réponse acceptée

This isn't specific to Lightsail, it's something that happens because of the way Linux handles processes being stopped. In this case, your shell process is stopped and so is anything else that was started in that shell.

You can work around it by using the nohup command.

profile pictureAWS
EXPERT
répondu il y a 2 ans
  • Thanks. It works.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions