How to get CRON to call in the correct PATHs

前端 未结 15 966
时光取名叫无心
时光取名叫无心 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条回答
  •  礼貌的吻别
    2020-11-22 07:04

    Set the required PATH in your cron

    crontab -e
    

    Edit: Press i

    PATH=/usr/local/bin:/usr/local/:or_whatever
    
    10 * * * * your_command
    

    Save and exit :wq

提交回复
热议问题