I have Python script bgservice.py and I want it to run all the time, because it is part of the web service I build. How can I make it run continuously even after I logout SSH?
I have Python script bgservice.py and I want it to run all the time,
Share
Run
nohup python bgservice.py &to get the script to ignore the hangup signal and keep running. Output will be put innohup.out.Ideally, you’d run your script with something like
superviseso that it can be restarted if (when) it dies.