Python won't exit when called with absolute path from cron or subshell

前端 未结 2 940
天命终不由人
天命终不由人 2020-12-19 21:51

I have some python scripts that run via cron, and they no longer exit correctly when the script is called with an absolute path. They will hang until the process is termina

2条回答
  •  余生分开走
    2020-12-19 22:27

    Instead of:

    /usr/bin/python /var/home/wotstats/test/test.py
    

    use:

    cd /var/home/wotstats/test/
    /usr/bin/python test.py

提交回复
热议问题