开发者

PHP script won't run as CRON job

开发者 https://www.devze.com 2023-01-25 04:00 出处:网络
Gurus, I have coded for my client a PHP script that performs some extensive data munging on text files he creates.

Gurus,

I have coded for my client a PHP script that performs some extensive data munging on text files he creates.

Code is complete and I have now to automate the script. Problem is that it seems to only run manually. I won't run as CRON job.

This is what I have tried with "#!/usr/bin/php -q" in the header of my script:

00 1  * * * /usr/bin/php -q /HDDLogs/HDDProcess.php >>/HDDLogs/HDDProcess.log 2>&1

The log file does get created but is empty. I tried removing the -q for quiet mode: no difference. Still did not run as CRON job. PHP File is chmod-ed 755.

Apache 2.0 and PHP 5.3 is installed on this server. I fully own the directory with my code and the data files are located.

In 开发者_JAVA百科case you're wondering, my script never calls a URL.

Any idea??

Thanks,

Al.


I think it should be:

"... /usr/bin/php -q -f /HDDLogs/HDDProcess.php ..."

or

"... /usr/bin/php -q < /HDDLogs/HDDProcess.php ...".

0

精彩评论

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