How to run python script in background after i logout

James David solar at infidel.ixx
Sun Jul 24 22:46:09 CEST 2005


"Harlin Seritt" <harlinseritt at yahoo.com> wrote in message
news:1122198224.635804.316950 at g49g2000cwa.googlegroups.com...
> I have a remote linux server where I can only access it via ssh. I have
> a script that I need to have run all the time. I run like so:
>
> python script.py &
>
> It runs fine. When I log off ssh I notice that the script died when I
> logged off. How do I make sure it stays running?

It sounds like you want to run your script as a daemon.

There are ways to do this and it is more of a *nix issue, but google
"python" and "run as a daemon". Also check out the createDaemon() function.





More information about the Python-list mailing list