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.

asked 2 years ago584 views
1 Answer
2
Accepted Answer

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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions