RE: [PHP] executing php scripts via cron

From: Date: Tue, 18 May 2004 08:29:59 +0000
Subject: RE: [PHP] executing php scripts via cron
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186455@lists.php.net to get a copy of this message
> I am trying to run a php script via cron. Problem is, that it > does not work if I > include the whole path in crontab > > Currently it looks like: > 0 6 * * * php > /home/www/project/app_cron/follow_up_new_members.php > /dev/null > > Most likeley because the webserver root for the project is: > /home/www/project/ > > So if I go into this dir and execute: > php app_cron/follow_up_new_members.php > > it workes. But not with the full path. What do I have to enter > into crontab? It > obviosly does not work with the full path, but how to change into > the directory > via cron first? It is probably because the cron daemon cannot find the php binary in its path try it like this... > 0 6 * * * /full/path/to/php/binary/php /home/www/project/app_cron/follow_up_new_members.php > /dev/null hth rich

« previous php.general (#186455) next »