LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=25)
-   -   Cron job using php from Litespeed (http://www.litespeedtech.com/support/forum/showthread.php?t=1424)

nicksnels 10-16-2007 07:39 AM

Cron job using php from Litespeed
 
Hi,

I have made a cron job that should run a php script each 15 minutes. My PHP 5 that is used by Litespeed is installed in /php5/bin/php. So my cron job looks like:

15,30,45,59 * * * * root /php5/bin/php /path_to_php_script

But nothing happens. What is going on? Is it possible to execute php scripts like this? Thanks.

Kind regards,

Nick

mistwang 10-16-2007 09:15 AM

Please try "/php5/bin/php /path_to_php_script" from command line first, make sure it works.

nicksnels 10-16-2007 09:47 AM

I did that. But it also didn't give the desired output. When I do /php5/bin/php -v , I get the php version back, so I guess I'm using the right one.

ffeingol 10-16-2007 10:01 AM

Does the php -v say that it's LSAPI or a CLI version?

Frank

mistwang 10-16-2007 10:05 AM

LSAPI can be used as CLI PHP interpreter. I think both version should do the job.
Does you script require any PEAR module? maybe you check whether required module can be found by PHP, You can try

"/php5/bin/php -c path_to_php.ini /path_to_php_script" see if it works.

nicksnels 10-17-2007 05:05 AM

Thanks for the help. It turned out that not the cron job was the problem, but that the mails send out by the cron job were blocked by the mail server.


All times are GMT -7. The time now is 11:40 PM.