[PHP] RE: [PHP-DB] mySQL Query From: Jimi Roenberg (jroenberg <email protected>)
Date: 08/10/00

Hi Ralph

If I was you I would not run a PHP-script with the lynx.

I would put the following in top of the php-file:
#!/usr/bin/php -q //if you have installed the default place....

And then i would just run it directly as a cronjob, with this line:
00 * * * * /home/user/www/public_html/script.php //remember to get the
correct path

'00' thats if you want to run it every whole hour.

Regards,

Jimi Rønberg

Ralph -

RG> 1. What is the best way to do this? Do I have to write this logic in
my PHP
RG> code, or can it be handled by a mySQL query.
You could simply SELECT your data from the table according to the date
you want to process.

RG> 2. Will I need to compile the cgi version of PHP so that I can run a
cron
RG> job everyday?
There's no need to have PHP as CGI to run a PHP script as a cron job.
If you have PHP as a module, use lynx. You cron line will look like
(assuming you want to run the script every minute):

* * * * * lynx -dump http://www.yourdomain.com/path/to/your/script.php3

if the dir where the script

Regards,

        Gianluca

--
ALBASOFTWARE
C/ Aribau 70 - 5º 1ª
08011 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
@@ ICQ 47323154 @@
webmaster <email protected>
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.com

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>