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.

posta 2 anni fa597 visualizzazioni
1 Risposta
2
Risposta accettata

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
ESPERTO
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande