Scheduled Tasks in Yii

Hi guys,

I am new to Yii (and PHP frameworks) but have been loving Yii so far. I have however run into a wall.

I have created code in a check_active.php file, which queries whether or not certain twitch.tv and own3d.tv streams are active and if they are it flags them and updates their stats.

Simply running this as a solo file on its own works, but I am wondering if there is a another way I SHOULD be doing it? Perhaps a way that is integrated into the Yii framework?

It is definately not a view, but perhaps a controller? If I made it a controller, how would I get it to run? The same as normal? Simply setting up a scheduled task with the location of the file?

Another question, does Yii have anything inbuilt for calling/parsing XML files?

I would greatly appreciate any guidance you can offer.