Crontab not executing a Python script?

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

    What happens when you type

    /home/me/project/myscript.py into the shell?

    Can you explicitly use /usr/bin/python in your crontbb command?

    Can you either use an absolute path to your test.db or cd to the correct directory then execute your python script?

    This is helpful to have debug statements in your python and log some data. Crontab can be very tricky to debug.

提交回复
热议问题