Cron job using php from Litespeed

#1
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
 
#3
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.
 

mistwang

LiteSpeed Staff
#5
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.
 
#6
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.
 
Top