-   Linux - General (
-   -   Cron not Executing PHP script (

Badnoodles 08-22-2006 07:18 PM

Cron not Executing PHP script
Hello All!

I'm moving several sites from a Gentoo box to a RedHat Box. Currently I'm trying to get my cron jobs set back up.

I use webmin to set up my cron so I did so on the new server just as I did on the old server.

Through webmin, via command line (both using root) and through a browser, the following script works fine:


php -f /usr/local/apache/cgi-bin/digest_Deploy.php
And I receive the daily digest email as intended via class.phpmailer.php.

When it comes time for the cron job it executes as expected, but my script dies. From my cron log:


Aug 22 16:44:01 crucible crond[6462]: (root) CMD (php -f /usr/local/apache/cgi-bin/digest_Deploy.php          #Daily Digest)
Aug 22 16:44:01 crucible crond[6461]: (root) MAIL (mailed 32 bytes of output but got status 0x0001 )

Does anyone have any idea why this script works fine every time I execute it except through cron?

Thanks in advance,

EDIT: Title should be "Cron not Executing PHP script properly"

seneschal 08-22-2006 09:58 PM

It seems like it's having an issue sending the mail. Is it possible that some of the mailing variables depend upon environment?

shouup 10-25-2006 05:56 PM

i dont know if this is related, but when i am trying to backup my iptables through cron it does back the file up but does not give me a confirmation e-mail. I think this is due to some kind of timeout, when you type "iptables - L" there is a short delay before the info is displayed and this delay is the only reason i can find on why cron is not giving me my e-mail confirmation (everything that has no delay works just fine)...maybe there is a timeout/delay in the e-mail you are sending out therefor cron wont do it. that just a guess though.

All times are GMT -5. The time now is 03:35 AM.