Answer the question
In order to leave comments, you need to log in
How to run a python script on ubuntu so that it doesn't shut down?
You need to run the script in the background so that when you close the terminal, it continues to work. How can I do that ?
Answer the question
In order to leave comments, you need to log in
There are many options, here's what I came up with on the go:
1. Run the script in bash with nohup .
2. Run the script in a tmux session and just debug from it. The session will continue to run. It's still the same manual launch of the script.
3. Create a systemd service .
4. Run in the background using supervisor .
If you need the script to work and run without human intervention, then options 3 and 4.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question