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.

已提问 2 年前598 查看次数
1 回答
2
已接受的回答

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
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则