#feature: some update
This commit is contained in:
+17
-8
@@ -26,14 +26,14 @@ Schedule::command('git-monitor:check')
|
||||
->withoutOverlapping(10)
|
||||
->runInBackground()
|
||||
->description('git-monitor-check')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-check'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('git-monitor-check'));
|
||||
|
||||
// Git Monitor - 每天凌晨 2 点刷新 release 缓存
|
||||
Schedule::command('git-monitor:cache')
|
||||
->dailyAt('02:00')
|
||||
->withoutOverlapping()
|
||||
->description('git-monitor-cache')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('git-monitor-cache'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('git-monitor-cache'));
|
||||
|
||||
// SLS 日志分析 - 每天凌晨 2 点执行(日志分析 + 代码分析)
|
||||
Schedule::command('log-analysis:run --from="-24h" --to="now" --query="content.level: ERROR" --mode=logs+code --push')
|
||||
@@ -41,8 +41,8 @@ Schedule::command('log-analysis:run --from="-24h" --to="now" --query="content.le
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('daily-log-analysis')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('daily-log-analysis'))
|
||||
->onFailure(fn() => Log::error('每日日志分析定时任务执行失败'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('daily-log-analysis'))
|
||||
->onFailure(fn () => Log::error('每日日志分析定时任务执行失败'));
|
||||
|
||||
// SLS 日志分析 - 每 4 小时执行一次
|
||||
Schedule::command('log-analysis:run --from="-6h" --to="now" --query="content.level: ERROR" --push')
|
||||
@@ -50,8 +50,8 @@ Schedule::command('log-analysis:run --from="-6h" --to="now" --query="content.lev
|
||||
->withoutOverlapping(60)
|
||||
->runInBackground()
|
||||
->description('frequent-log-analysis')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('frequent-log-analysis'))
|
||||
->onFailure(fn() => Log::error('SLS 日志分析定时任务执行失败'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('frequent-log-analysis'))
|
||||
->onFailure(fn () => Log::error('SLS 日志分析定时任务执行失败'));
|
||||
|
||||
// Jenkins Monitor - 每分钟检查新构建
|
||||
Schedule::command('jenkins:monitor')
|
||||
@@ -59,11 +59,20 @@ Schedule::command('jenkins:monitor')
|
||||
->withoutOverlapping(10)
|
||||
->runInBackground()
|
||||
->description('jenkins-monitor')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('jenkins-monitor'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('jenkins-monitor'));
|
||||
|
||||
// ERP OpenAPI 请求日报 - 每天早上 8 点统计前一天请求并发送钉钉
|
||||
Schedule::command('erp-request-report:send')
|
||||
->dailyAt('08:00')
|
||||
->timezone('Asia/Shanghai')
|
||||
->withoutOverlapping()
|
||||
->runInBackground()
|
||||
->description('erp-request-report')
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('erp-request-report'));
|
||||
|
||||
// 定时任务刷新 - 每天凌晨 3 点刷新定时任务列表
|
||||
Schedule::command('scheduled-task:refresh')
|
||||
->dailyAt('03:00')
|
||||
->withoutOverlapping()
|
||||
->description('scheduled-task-refresh')
|
||||
->when(fn() => \App\Services\ScheduledTaskService::isEnabled('scheduled-task-refresh'));
|
||||
->when(fn () => \App\Services\ScheduledTaskService::isEnabled('scheduled-task-refresh'));
|
||||
|
||||
Reference in New Issue
Block a user