RE: [PHP] Re: Use cron to execute a script --> OTHER problem now

From: Date: Tue, 21 Aug 2001 12:50:25 +0000
Subject: RE: [PHP] Re: Use cron to execute a script --> OTHER problem now
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63692@lists.php.net to get a copy of this message
php files are text files you have to tell cron (or more directly the system) what to do with it. like a perl script, simply tell it where to find the PHP processor and it will then use it to run your script... otherwise it is just diaplaying a page of text every minute. you must have a cgi copy of PHP executable available to run your script, yes you can have both on your server if you are already running the mod_php version. add #!/usr/local/bin/php -q to the first line in your script... then cron will know what to do with your text file. BTW; a quick search on google for "run php as shell script" produced this as the number 1 result http://www.phpbuilder.com/columns/darrell20000319.php3 searching for "PHP and CRON" produced yet another plethora of responses. Dave >-----Original Message----- >From: Augusto Cesar Castoldi [mailto:accastoldi@yahoo.com.br] >Sent: Tuesday, August 21, 2001 8:17 AM >To: php-general@lists.php.net >Subject: [PHP] Re: Use cron to execute a script --> OTHER problem now > > >Hi. > >now my cron is working, but the command don't. If I do >manualy "lynx -dump -nolog >http://localhost/backups/backup.php" it works, but >with cron didn't worked. I receive this "e-mail" from >"Cron Daemon": >------------------------------------------------------- >Subject: Cron <httpd@vendaval> lynx -dump -nolog >http://localhost/backups/backup.php > >Your terminal lacks the ability to clear the screen or >position the cursor. >------------------------------------------------------- > >Why didn't worked? > >thanks, > >Augusto > > >_______________________________________________________________________ >________________________ >Yahoo! GeoCities >Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! >GeoCities. É fácil e grátis! >http://br.geocities.yahoo.com/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#63692) next »