Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Keep and access a python file once logged out?

I want my python script to keep running even after I log out of my SSH session.

Then when I log back in, I can go back into the script where it currently is.

(I need to type commands and when I log out my script just closes all the connected connections).
Spoiler (Click to View)


edit:
If none of this works try. I may have mis-read some o the documentation of the above examples.
Code
nohup python examplescript.py  > /var/log/python/examplescript.log 2>&1 &
And to check the output run
tail /var/log/python/examplescript.log
yes
(Jul 12, 2017 04:24 PM)PGTips Wrote:  I want my python script to keep running even after I log out of my SSH session.

Then when I log back in, I can go back into the script where it currently is.

(I need to type commands and when I log out my script just closes all the connected connections).

What kind of permissions do you have when you log in?
Try using something like screen, that way it should be able to stay alive when you close your connection.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by hack3rconNov 30, 2016 04:46 PM 8 355 Nov 30, 2016 04:46 PM
Last Post: datguy.dev
by dnh43sdn399wsj39Jul 27, 2013 01:56 PM 0 96 Jul 27, 2013 01:56 PM
Last Post: dnh43sdn399wsj39