I have python script which downloads N number of images from website. I run it on webserver ubuntu 10.04. For example download.py downloads 10000 images from website, prints to file about occured errors. After downloading N images it exits. Usually on local machine I run it like:
sudo python download.py
How can I run it on webserver to be always running and when it finished it should stop? I run it manually when I need(cron jobs is not necessary). for loop in script:
for i in range(1, N):
#do download
If script is stopped by some errors, I will need to run again from beginning, while I do not save any data to run from stop place.
In my situation I can run it like:
sudo nohup python download.py