sp-niemand / yii2-jobby
Jobby wrapper for Yii2
dev-master
2015-05-21 13:17 UTC
Requires
- php: >=5.4
- hellogerard/jobby: dev-master
Suggests
- fishvision/yii2-migrate: To use migrations from modules if Yii2 can't do it yet
- yiisoft/yii2-mongodb: Needed to use default Jobby DB model implementation
This package is not auto-updated.
Last update: 2025-03-01 18:35:29 UTC
README
This is a package for Yii2 framework. Store tasks for Jobby in your database (key-value storage, whatever).
Basic usage
Add jobby module to your configuration file:
'modules' => [
...
'jobby' => [
'class' => '\jobbyDb\JobbyModule',
],
...
]
Add <projectPath>/yii jobby
to your scheduler configuration. For example, cron:
* * * * * /var/www/project/yii jobby
Now you can use jobby
SQL table in MySQL or something similar to configure and schedule tasks.
Advanced usage
It is possible to inject your own model class into the module.
Your model must implement \jobbyDb\model\JobbyModelInterface
'modules' => [
...
'jobby' => [
'class' => '\jobbyDb\JobbyModule',
'modelClass' => '\rootNamespace\RedisJobbyModel',
],
...
]