Re: DB INSERT & CRON

From: Date: Thu, 03 Mar 2005 18:08:01 +0000
Subject: Re: DB INSERT & CRON
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-209931@lists.php.net to get a copy of this message
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

« previous php.general (#209931) next »