Answer the question
In order to leave comments, you need to log in
Running a script over SSH
There is a script on a remote machine that needs to be run for a long time (calculation).
Can you please tell me how to launch it in such a way that I can break the connection and at the same time the application continues to work?
ps when run with the "&" key, the script still breaks on exit.
Answer the question
In order to leave comments, you need to log in
/usr/bin/foo >/dev/null 2>&1 &
or
nohup /usr/bin/foo >/dev/null 2>&1 &
If you need to connect later and interact with the script, then everyone recommends using screen, but I so unbearable.
It seems to be what you need :)
unixforum.org/index.php?showtopic=111749
Learning to google!
connect via ssh and write to the console:
1) cd "home/script1/" - write the path to the file without quotes
2) screen python "main.py" - write your file without quotes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question