cronweb 是基于yzh52521/webman-task的webui實現(xiàn),yzh52521/webman-task是基于 webman 的動態(tài)設(shè)置定時任務(wù)管理
安裝請參照安裝步驟,安裝基礎(chǔ)插件。
安裝請參照安裝步驟,安裝基礎(chǔ)插件。
安裝請參照安裝步驟,安裝基礎(chǔ)插件。
重要提示:windows用戶 啟動webman 使用 windows.php
1.使用tp-orm
composer require yzh52521/webman-task
2.使用laravel-orm
composer require yzh52521/webman-task dev-lv
1.crontab
composer require workerman/crontab
2.guzzle
composer require guzzlehttp/guzzle
3.redis
composer require -W illuminate/redis illuminate/events
修改配置config/redis.php
:
return [
'default' => [
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
'database' => 0,
]
];
4.依賴注入
composer require psr/container ^1.1.1 php-di/php-di ^6 doctrine/annotations ^1.14
修改配置config/container.php
:
$builder = new \DI\ContainerBuilder();
$builder->addDefinitions(config('dependence', []));
$builder->useAutowiring(true);
$builder->useAnnotations(true);
return $builder->build();
Cron Web
插件管理
> Cron Web
> 安裝
Q:數(shù)據(jù)表不存在
A:配置沒有配置正確,修改config/plugin/yzh52521/task/app.php
:
return [
'enable' => true,
'task' => [
'listen' => '0.0.0.0:2345',
'async_listen' => '0.0.0.0:2346',
'crontab_table' => 'system_crontab', //任務(wù)計劃表
'crontab_table_log' => 'system_crontab_log',//任務(wù)計劃流水表
'prefix' => '修改這里!?。。。。?, //表前綴 與 database 設(shè)置一致
'debug' => true, //控制臺輸出日志
'write_log' => true,// 任務(wù)計劃日志
'runInBackground' => false //命令行任務(wù)是否后臺運行
],
];
Q:stream_socket_client(): Unable to connect to tcp://0.0.0.0:2345 (在其上下文中,該請求的地址無效。)
A:修改配置config/plugin/yzh52521/task/app.php
:
return [
'enable' => true,
'task' => [
'listen' => '127.0.0.1:2345', // 修改為具體的IP
'async_listen' => '127.0.0.1:2346', // 修改為具體的IP
'crontab_table' => 'system_crontab', //任務(wù)計劃表
'crontab_table_log' => 'system_crontab_log',//任務(wù)計劃流水表
'prefix' => '修改這里!?。。。?!', //表前綴 與 database 設(shè)置一致
'debug' => true, //控制臺輸出日志
'write_log' => true,// 任務(wù)計劃日志
'runInBackground' => false //命令行任務(wù)是否后臺運行
],
];
Q:RedisManager Not Found
A:安裝Redis
composer require -W illuminate/redis illuminate/events
Q:Call to undefined method DI\ContainerBuilder::useAnnotations()
A:新版php-di
已經(jīng)移除該方法,請使用useAttributes
,或者使用下面適配的方式:
$builder = new \DI\ContainerBuilder();
$builder->addDefinitions(config('dependence', []));
// 判斷方法是否存在
if (method_exists(\DI\ContainerBuilder::class, "useAnnotations")) {
$builder->useAnnotations(true);
}
// 判斷方法是否存在
if (method_exists(\DI\ContainerBuilder::class, "useAttributes")) {
$builder->useAttributes(true);
}
$builder->useAutowiring(true);
return $builder->build();
博客同步更新,傳送門
等更新版本重新安裝,上一個版本打包錯了,你可以臨時處理一下,在plugin下新建一個cronweb文件夾,把plugin下的api、app、config目錄都放到cronweb目錄下,執(zhí)行php webman app-plugin:install cronweb即可,新版本已經(jīng)提交了,等老大審核通過,后續(xù)正常安裝也能用
菜單不顯示出來怎么弄?