Re: Can't run PHP cli script from Cron

From: Date: Fri, 28 Feb 2003 18:26:34 +0000
Subject: Re: Can't run PHP cli script from Cron
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137603@lists.php.net to get a copy of this message
You might want to post some code so we can see why it is not running... What do you get when you run the code from the commandline? -- Ray On Thu, 2003-02-27 at 21:30, Justin Michael Couto wrote: > I am trying to run a PHP CLI script from cron using PHP 4.3 and FreeBSD > 5.0 > > This is what I have verified: > > My clock is set right > I can run bash scripts from cron > I have tried running the script as root and as other users > If I run the PHP CLI script by had it works fine > I set cron to run the script every minute just to make sure I am doing > my cron tab right > > Here is my crontab entry: > > * * * * * /path/to/file/file_name.php > > I also have > > * * * * * /path/to/file/bash_test_script > > which contains the following information > > ls -l >> /path/to/file/holder/file_results.txt > > With every passing minute the bash script gets run and file > file_results.txt get another ls appendied to it > > On the other hand, Nothing happens with the PHP script. Inside the php > script I have it emailing me using the php mail() funtction. If I run > this script by hand I get an email from the script. If I run the script > by cron everyminute I get nothing when I should be getting a email every > minute. > > I hope someone can help me with this. >

« previous php.general (#137603) next »