Crontab not executing a Python script?

前端 未结 15 1548
囚心锁ツ
囚心锁ツ 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:49

    This might be helpful for someone. I was having this same issue (or at least a similar issue) and what helped me was to get the path in which Python (Be aware of the version you want to use python, python3, etc...) by running this:

    which python3
    

    And then, I replaced python3 for the full path of python3 in my crontab file.

提交回复
热议问题