Scooby08 0 Newbie Poster

Basically...
I'm collecting xml data and storing it into a database. Then I'm calling that info from the database using a jquery .ajax function to load and display it on the page.. It all works fine..

The problem...
The xml file consists of many sports leagues with odds for each game in that league.. Right now it takes a few seconds to load all that data and put it into the database.. Now when the user goes to the odds page on the site they have to wait a few seconds for all that data to update into the database and then load to display..

What I would like to know...
How could I load the latest xml data into the database so that the user does not have to wait??

The closest I've gotten to solving...
I've tried running a cronjob every minute, which works great, but that won't work because the cronjob stops right when I turn off my computer.. I need it to run always so the users always have to most recent data.. And I'm not so sure this is the most efficient way of getting it done either..

There has to be some way of getting this done by using ajax or something like that, but I have no clue how to approach this.. I need some strategy.. Could anybody out there give me a few ideas as to how this might be done??

If I didn't give enough information just let me know and I'll try and be more specific..

Thanks everybody!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.