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:[EMAIL PROTECTED]]
>Sent: Tuesday, August 21, 2001 8:17 AM
>To: [EMAIL PROTECTED]
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to