Crontab not executing a Python script?

前端 未结 15 1540
囚心锁ツ
囚心锁ツ 2020-11-29 20:42

My python script is not running under my crontab.

I have placed this in the python script at the top:

#!/usr/bin/python

I hav

15条回答
  •  一生所求
    2020-11-29 20:55

    Try to put in your crontab:

    * * * * * python /path/to/your/script.py
    

    rather than

    * * * * * /path/to/your/script.py
    

    Also the shebang line is #!/usr/bin/env python in some environments. env is an executable, and you have to know where it lives with "$ which env".

提交回复
热议问题