Re: Best way to start a CRON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I run several PHP scripts via CRON in the following way:

put the following in the top of the php script:

#!/usr/local/bin/php -q (linux system - location of php bin)

and in the CRONTAB I have the following:

10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php

the -q supress HTML headers.

hope this helps!


Pure Web Solution
http://www.purewebsolution.co.uk
PHP, MYSQL, Web Design & Web Services

Barry <barry@xxxxxxxxxxxxxx> wrote:

> Hello Everyone!
> 
> What would be the best way to start a PHP Script via CRONJOB?
> Should i use the 'php' command or use curl or lynx or something to
> open that URL?
> 
> The Script does a MySQL query, collects data and sends it via E-Mail 
> every monday morning to the recipient.
> 
> Any help will be appriciated :)
> 
> Barry

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux