Welcome Guest, Not a member yet? Register   Sign In
Event-driven single background process?
#1

[eluser]Joakal[/eluser]
I'm expecting some website prices not to update very often, so I limit the look ups to once per hour started by an occasional interested user (so I wish to avoid resources-consuming hourly checks).

However, when the website prices change, the process can take a long time and leaves the user confused with a processing page. I've looked at Cron jobs: http://codeigniter.com/wiki/Category:Adv...ronScript/ But I don't want an hourly cron job per website, make user wait or be unable to use CI libraries (with exec).

I tried fsockopen without reading output, this did run the process in the background. But it can still generate multiple requests unless I mark the record as checking in database. The trouble is that the initial process marked as 'checking' may later fail for some reason and future refreshes of primary page won't work or it's the best way?

Has anyone done non-return background processes?




Theme © iAndrew 2016 - Forum software by © MyBB