I have a python script that takes several hours to complete. I usually run it as:
python myscript.py arg1 arg2 ... argN 2> log.err > log.out &
I'd like to have a shell script that runs several time the same python script (with different parameters). This script has to start the second python script ONLY when the first one has terminated and so on. I think I should use PID of the processes and iteratively check using sleep within some while loops. Any suggestions? The scripts are executed in a remote machine so I have to put them in background in order the guarantee they keep executing even when I log out.