In order to execute a task background, I use
# nohup python patrol.py &
Everything works well but when I close ssh connection and connect it again, I find the process id does not exist.The python task sends a request to an api every 20 minutes.From the api server console, I find the process still works.However from
ps command I can not find the process id
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.