开发者

CRON jobs keep erroring

开发者 https://www.devze.com 2023-02-16 22:26 出处:网络
We have several CRON jobs running on our apache / whm server. We are using php. The scripts all work completely fine when run from the browser.

We have several CRON jobs running on our apache / whm server. We are using php. The scripts all work completely fine when run from the browser.

The cron will throw back errors like: unable to include files (even when giving the absolute path).

Results will also vary, corrupting output files etc. I am really baffled, as sometimes the crons work fine as well. Seems really intermittent and they work every time perfectly when executed from the browser.

Any help would be appreciated, che开发者_高级运维ers.


As everyone has pointed out, PHP CLI and the PHP Apache Module are separate software and they have separate configuration files.

Rather than set the crontab up on the root cron tab, make sure all your permissions are correct. Debug with the user they will run from cron as. Assuming you are running Linux, you can use

sudo -i -u username

for this.

0

精彩评论

暂无评论...
验证码 换一张
取 消