dev-master
9999999-devAllows to define and execute cronjobs in Yii2 application
BSD-3-Clause
The Requires
by Fuzz
extension yii2 cron
Allows to define and execute cronjobs in Yii2 application
Allows to define and execute cronjobs in Yii2 application, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist comradefuzz/yii2-cron "*"
or add, (*4)
"comradefuzz/yii2-cron": "*"
to the require section of your composer.json
file., (*5)
Add cron console controller to your config and define your jobs :, (*6)
'controllerMap' => [ 'cron' => [ 'class' => 'comradefuzz \yii2cron\CronController', 'crontab' => [ ['* * * * *', 'yii app/my-useful-action'], ['* * * * *', 'echo "ONE MORE"'], ['*/5 * * * *', 'echo "Not so fast"'], ], 'log' => true, // Enables logging (default `false`) 'logCategory' => 'crontab', // Log category (default `crontab`) ], ]
Then configure your server crontab:, (*7)
* * * * * /path/to/yii cron > /dev/null 2>&1
Allows to define and execute cronjobs in Yii2 application
BSD-3-Clause
extension yii2 cron