wowthink / yii2-crond
crond
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- dragonmantank/cron-expression: ^2.3
- react/child-process: ^0.6.1
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2025-05-11 08:26:45 UTC
README
安装方式
运行
composer require --prefer-dist wowthink/yii2-crond
或者
直接下载归档 进行配置
common/config/mian.php
'aliases' => [ 'wowthink/crond' => '.../yii2-crond/src', ]
用法
安装扩展后,只需在代码中使用它 :
配置后台显示
backend/config/mian.php
'modules' => [ 'crond' => [ 'class' => 'wowthink\crond\Module', ], ],
配置命令行
console/config/mian-local.php
'bootstrap' => ['crond'], 'modules' => [ 'crond' => [ 'class' => 'wowthink\crond\Module', 'php_path' => '/usr/bin/php', //默认php 'yii_path' => '/home/wwwroot/base/yii', //默认yii ], ],
执行migrate
php yii migrate --migrationPath=@wowthink/crond/migrations
启动定时任务
php yii crond/run