Re: Best way to start a CRON

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

 



Pure Web Solution wrote:
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)

^^^^^^^  If you're going to use this....

and in the CRONTAB I have the following:

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

There's no need to repeat it here ^^^ (make the script executable)

the -q supress HTML headers.


_HTTP_ headers. This is only necessary if you're running an older version. The CLI (since 4.2 I think) automatically does this.

http://www.php.net/manual/en/features.commandline.php

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
jnichel@xxxxxxxxxxxxxxxxxxxxxxxxxxx

--
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