Re: [PHP] Best way to start a CRON

2006-04-20 Thread Richard Lynch
On Thu, April 20, 2006 4:03 am, Barry wrote: > 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? Ideally just use CLI PHP. Slightly sub-optimal is CGI PHP with -q argument. Also use FULL PATH to the

Re: [PHP] Best way to start a CRON

2006-04-20 Thread John Nichel
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 /

Re: [PHP] Best way to start a CRON

2006-04-20 Thread M. Sokolewicz
Actually, you can even use less "code" to do exactly the same thing (since you can EITHER make an excutable file with the shebang, which you start doing, but never actually do, OR call php to just read the file and execute the code inside it, which you in the end do). Basically, either: #!/usr

Re: [PHP] Best way to start a CRON

2006-04-20 Thread Barry
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) and in the CRONTAB I have the following: 10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php

Re: [PHP] Best way to start a CRON

2006-04-20 Thread Pure Web Solution
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 header

Re: [PHP] Best way to start a CRON

2006-04-20 Thread nicolas figaro
Barry a écrit : 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? Hi, unless you need to be sure the http server is up and running, it's a better way to run your script via a cronjob.

[PHP] Best way to start a CRON

2006-04-20 Thread Barry
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 appricia