Cannot get PHP cron script to run

前端 未结 4 683
轮回少年
轮回少年 2020-12-06 22:52

I have a PHP script that I need to run every minute. I have made sure that the script works from the command line, and I\'m using absolute paths to avoid any environment iss

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-06 23:05

    I found a solution for my issue:

    https://serverfault.com/questions/97828/php-from-command-line-path-problems/97881#97881

    It turns out I needed to cd (change directory) into the script dir and then call it. Surprising, since I'm using absolute paths, but it works. Thanks to those who have taken the time to respond.

提交回复
热议问题