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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

php - Symfony 2: "No route found for "GET /" - error on fresh installation -