semsty / crontab
yii2 crontab
Installs: 1 426
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.2.0
- yii2tech/crontab: ^1.0@dev
- yiisoft/yii2: ~2.0.15
Requires (Dev)
- phpunit/phpunit: ~7.1.0
This package is not auto-updated.
Last update: 2025-03-08 13:34:57 UTC
README
Yii2 crontab
add to components
...
'schedule' => [
'class' => \semsty\crontab\Component::class,
'init' => [
'example' => [
'* * * * *',
'echo Hello >> /tmp/world'
]
]
]
...
Usage
./yii schedule/add example '* * * * *' 'echo Hello >> /tmp/world'
Yii::$app->schedule->add('example', '* * * * *', 'echo Hello >> /tmp/world')
crontab will update once a minute