Working script after closing session

2019-09-02 16:32发布

问题:

I use Amazon EC2. I connect by SSH and run python script. If I exit, will it continues working?
How can I run Python script, close SSH session and he's been working on?

回答1:

before your script use nohup command (nohup python example.py).the output will be stored in nohup.out in ur execution folder.