dynamikaweb / yii2-fake-cronjob
Installs: 222
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:yii2-extension
Requires
- php: >=5.5.0
- yiisoft/yii2: *
Suggests
- omnilight/yii2-scheduling: to manage cronjobs
This package is auto-updated.
Last update: 2024-12-10 20:10:34 UTC
README
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require dynamikaweb/yii2-fake-cronjob "*" $ composer require omnilight/yii2-scheduling "*"
or add
"dynamikaweb/yii2-fake-cronjob": "*", "omnilight/yii2-scheduling": "*"
to the require
section of your composer.json
file.
And append
[ 'components' => [ // this plugin 'cronjob' => [ 'class' => 'dynamikaweb\fakecronjob\FakeCronJob' ], // suggested 'schedule' => [ 'class' => 'omnilight\scheduling\Schedule' ], ... ] ]
to install application component of your config/main.php
file.
Usage
Yii::$app->schedule->command('foo')->daily()->description('mycommand'); Yii::$app->cronjob->update('mycommand');
see more schedule examples in https://github.com/omnilight/yii2-scheduling