script entry for cron job

i want to implement cron jobs in my application.

i refered to cron jobs

defined('YII_DEBUG') or define('YII_DEBUG',true);


// including Yii



// we'll use a separate config file



// creating and running console application


where do i put this piece of code?

same with the index.php , you could name it to console.php then you can access it from command line like :

php.exe(or php) c:/xxx/xx/myProject/console.php yourCommand

actually you can use the yiic command too :

C:\Users\myName>php C:\xampp\htdocs\myProject\protected\yiic test

the yiic is come with yii framework and generated by it ,you can find it in protected dir . the original one is under the framework dir you can check it (framework/yiic ,yiic.bat ,yiic.php )