I made research on site but couldn't find answer, so I decided yo ask this.
I'm getting data via XML and this XML renews every 10 seconds. So, I have to re-run my Controller in every 10 seconds. I can not make it via Cron as you know it is not allowing cron jobs under 1 minute.
Thanks in advance.
Best How To :
Use sleep and run the script once.
// parse xml
Or if you wanna limit the time, then just change true with your limit and increment it in the end of the block. The only problem within this solution would be that if xml parsing takes 5 seconds, then this will be called in each 15 seconds, so make the arrangement according to this.