php - Call a Controller in every 10 Seconds on CodeIgniter -
i made research on site couldn't find answer, decided yo ask this.
i'm getting data via xml , xml renews every 10 seconds. so, have re-run controller in every 10 seconds. can not make via cron know not allowing cron jobs under 1 minute.
thanks in advance.
use sleep , run script once.
while(true) { sleep(10); // parse xml }
or if wanna limit time, change true limit , increment in end of block. problem within solution if xml parsing takes 5 seconds, called in each 15 seconds, make arrangement according this.
Comments
Post a Comment