0

I have a python script that need to run for 10 days with out any disturbance , new to python is there a way i can run the script , and script should not stop if we close terminal. going to deploy EC2 Ubuntu instance amazon - also my local machine . Please let me know how can i accomplish this task in case of modification needed in the program may need restart.

1 Answers1

0

You can use nohup.

And if you retroactively want to exit a shell already running the process you can disown the running process.

You might also use screen to run the process in a shell to which you can return.

fabianegli
  • 2,056
  • 1
  • 18
  • 35
  • @fabianegli- is there any documentation available - how to use nohup – anoop ayyapan Feb 24 '19 at 12:22
  • You can type `man nohup` in the console/terminal/command line to read the manual (press `q` to exit the manual, `space` to scroll down and `b` to scroll up). There is also a simple example in [this answer](https://stackoverflow.com/a/2975645/6018688) – fabianegli Feb 25 '19 at 12:42