mysql - How to run the PHP and/or CodeIgniter function continuously -
i working on location-based social networking website integrating foursquare. have used login foursquare, whenever user login foursquare account access token using data foursquare account large , takes lot of time. that's why looking solution retrieve foursquare data continuously in cycle.
is there way run codeigniter or php function continuously
update users data instead of updating data scheduled basic using cronjob
, should run once run function run infinite time without stop.
note:
i using curl
data foursquare
thanks in advance!
you can write simple php script following , run script scheduling in cron job , once script runs, delete cron tab (the script keep runing):
while (true) { // setup curl request foursquare // fire curl request , results // processing // can put sleep here before again loops // here magic break infinite loop - check // variable database table or ini file , break loop // if variable set }
hope helps.
Comments
Post a Comment