Run program in background
nohup COMMAND &
Run Python in background
nohup python FILE.py PARAM &
Pipe output and stderr to log file
nohup COMMAND > /DIR/LOGFILE.log 2>&1 &
Save Process ID
nohup COMMAND > /DIR/LOGFILE.log 2>&1 &echo $! > /DIR/PID.txt
Check Process Status
ps -p `cat /DIR/PID.txt`
Kill Process
kill -9 `cat /DIR/PID.txt`rm /DIR/PID.txt