Difference between #2 and #3 of
Cron Jobs in Yii

Revision #3 has been created by Roman Solomatin on Nov 9, 2015, 8:02:15 PM with the memo:

Set Yii version.
« previous (#2)

Changes

Title unchanged

Cron Jobs in Yii

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

cron, cronjobs, heroku, bash, console, Yii Console, yiic

Content unchanged

[...]
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.
2 0
9 followers
Viewed: 27 816 times
Version: 1.1
Category: How-tos
Written by: aarondfrancis
Last updated by: Roman Solomatin
Created on: May 6, 2013
Last updated: 4 years ago
Update Article

Revisions

View all history