In fact that I am too poor to buy a server to run my website, but I want to run cron auto, so I use ajax to do it! :P
In the file of the layout, add the code as below:

<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type:'GET',
url:"<?php echo Yii::app()->createUrl("/site/cron");?>",
data:''
});
});
</script>
in the path /site/cron, you can write some code to do what you want. :)
Have fun with Yii!