LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-22-2006, 06:18 PM   #1
Badnoodles
LQ Newbie
 
Registered: Aug 2006
Posts: 1

Rep: Reputation: 0
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:

Code:
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:

Code:
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,
Badnoodles

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

Last edited by Badnoodles; 08-22-2006 at 06:22 PM.
 
Old 08-22-2006, 08:58 PM   #2
seneschal
LQ Newbie
 
Registered: Jul 2006
Location: Minnesota
Distribution: RHEL, Debian, Ubuntu
Posts: 27

Rep: Reputation: 15
It seems like it's having an issue sending the mail. Is it possible that some of the mailing variables depend upon environment?
 
Old 10-25-2006, 04:56 PM   #3
shouup
Member
 
Registered: Sep 2005
Location: Omaha, NE
Distribution: OpenSuSe 10.2
Posts: 34

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
Executing UNIX command from PHP script ckoniecny Programming 3 03-01-2006 10:42 PM
cannot get tu run a php script in cron alain Linux - General 6 02-06-2006 02:54 AM
Problem executing a linux script from php that runs ffmpeg darkisolde Linux - Software 4 10-04-2005 07:43 AM
Executing PHP script- error message vfulco Linux - Newbie 3 07-13-2004 10:55 PM


All times are GMT -5. The time now is 08:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration