Re: DB INSERT & CRON

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

 



Devraj Mukherjee wrote:
> Depending on the urgency of the data being transported into the database
> from the XML file, you could even run a server process that will wait
> for a new file to be added to a nominated directory and add the data to
> the database.
>
> As far as I know you could possibly use the PHP engine to that from the
> command line, command line invocation will not timeout as web scripts.
> Cron is a good idea if you dont mind the delay.

command line PHP will time out as well, but you can specify a custom
php.ini for it to reset the timeout to any value you like, including '0',
which means no time out at all.

I'd actually time/test it with sample data and then set the time-out to
"metric time" of the longest run.

metric time: double it and add 30

Allowing the user to just upload/input their data and then let cron handle
the slow stuff is DEFINITELY a Good Idea, in general.

There are a ton of background processes you can do to off-load slow things
from the user-interface.

Don't make people wait for the computer!  People time is expensive. 
Computer time is cheap.

-- 
Like Music?
http://l-i-e.com/artists.htm

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