Skip to content

How to let the python script ( keep executing on AWS even after Connection lost or SSH connection is terminated?

I was using Jupyter notebook on AWS AMI and using the port forwarding on Windows using PuTTY. I got my connection terminated and all the work of 24 hours is lost now and I’m unable to get that. So I used a script instead of Notebook and the same thing happened. I used to think that the process would keep going on even if the Shell connection is lost. But next time I login, I don’t see anything. I used top, htop aux to find if my processes are still running but they don’t show my process. Please help how can I stop this from happening.

I am using Windows on 10 with Putty on local and Ubuntu 18 on the AWS AMI.



You can try

nohup python3 &
9 People found this is helpful