środa, 13 sierpnia 2014

php: No such file or directory cron. PATH variable missing in crontab

In the last time I was trying to schedule task in Laravel 4 using dispatcher package. Title error is what I find when trying to run command scheduled:run by cron. Running it in CLI work just fine, but to work in cron i need to do this:
  • run crontab -e 
  • add PATH variable at beginning of crontab file it should look like:
    PATH=/usr/local/bin:/bin:/usr/bin
  • pathes that can be find by running  /usr/bin/env
  • that's all, just save it