Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
XP is just a number
 
PerlMonks  

Re: program with a timer

by sutch (Curate)
on Jan 12, 2001 at 23:45 UTC ( #51447=note: print w/ replies, xml ) Need Help??


in reply to program with a timer

An alternative to cron or NT's AT is to use your CGI program to retrieve the stock quotes when they have passed their "freshness" time. I've used this method to minimize requests to external hosts:

- maintain a database of stock symbols, quotes, and the last time retrieved.
- on each GGI request for a quote, retrieve the quote from the database. If it is not available or the last time retrieved is older than the max freshness time (say, five minutes), grab the quote from the external host and update the database.

This will ensure that application supplies the latest quotes (within five minutes) while avoiding unnecessary requests for quotes.


Comment on Re: program with a timer

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://51447]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-04-17 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls