Welcome Guest, Not a member yet? Register   Sign In
Beginner getting a grasp of MVC/CI/PHP and Twitter library
#21

[eluser]n0xie[/eluser]
That could very well be the case.

An easy way to do it via background process is to move the 'retrieval and inserting' part of your code to another controller, since your 'view' gets his data from your database. Then automatically execute that controller say once every X minutes. That way you make sure you won't go over the maximum number of requests.
#22

[eluser]jpcody[/eluser]
Hey n0xie, sounds like a brilliant idea. I'm googling and foruming as we speak, but if you have the time and the link, could you direct me somewhere on my way to figuring out how one automatically executes a controller?
#23

[eluser]n0xie[/eluser]
I'm not sure how to do it on MAMP but since it's based of BSD you should be able to execute a CRON job from the command line, which is basically just a 'scheduled task'. I believe there is also a CI implementations (found it).

You could also take a look at this if you have curl installed:
http://drupal.org/node/434416

Basically you just tell your server to call your specific controller every X minutes. Also very handy for maintenance scripts so definitely worth looking into.




Theme © iAndrew 2016 - Forum software by © MyBB