Revision #3 has been created by Roman Solomatin on Nov 9, 2015, 8:02:15 PM with the memo:
Set Yii version.
« previous (#2)
Cron Jobs in Yii
cron, cronjobs, heroku, bash, console, Yii Console, yiic
[...]When you are creating a new CronJob, pass any parameters in as an array and the Model will serialize them for you.
Next, we need the CronCommand so that we can process these jobs from the command line. I set mine up with one action (actionIndex) that processes all the jobs. It selects all the jobs that need to be executed that haven't yet been, and starts to process them.
For all the code, check out the github page at [https://github.com/aarondfrancis/yii-CronCommand](https://github.com/aarondfrancis/yii-CronCommand "https://github.com/aarondfrancis/yii-CronCommand"). There you will find the migration, the model, the console command, and a bash script for if you are on Heroku.