How to get CRON to call in the correct PATHs

前端 未结 15 1226
时光取名叫无心
时光取名叫无心 2020-11-22 06:07

I\'m trying to get cron to call in the correct PATHs. When I run a Python script from shell the script runs fine as it uses the PATHs set in bashrc but when I use cron all t

15条回答
  •  猫巷女王i
    2020-11-22 06:53

    Adding a PATH definition into the user crontab with correct values will help... I've filled mine with just:

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    

    And it's enough to get all my scripts working... Include any custom path there if you need to.

提交回复
热议问题