python crontab and paths

前端 未结 1 937
孤独总比滥情好
孤独总比滥情好 2021-01-13 22:21

I have a Python driver and library scripts that are siblings:

/home/mydir/pythonProjs/
  • driver.py

相关标签:
1条回答
  • 2021-01-13 23:09

    Try to print out environment variables from a dummy job

    * * * * * env > /tmp/env.output
    

    as suggested in https://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work

    Also check what shell crontab is using. You can set the $SHELL environment variable to bash by adding a line

    SHELL=/bin/bash

    at the beginning of the crontab file.

    0 讨论(0)
提交回复
热议问题