From 12fc0c5ce84ff44511d403ba51169885937d0e8f Mon Sep 17 00:00:00 2001 From: wanghu Date: Wed, 2 Sep 2026 16:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/YhCore.Task/QuartzHostedService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/YhCore.Task/QuartzHostedService.cs b/src/YhCore.Task/QuartzHostedService.cs index ba4a4d6..12db089 100644 --- a/src/YhCore.Task/QuartzHostedService.cs +++ b/src/YhCore.Task/QuartzHostedService.cs @@ -48,8 +48,9 @@ namespace YhCore.Tasks { // ============ 定时任务注册 ============ - // 1. 审计日志清理(对应 Java SysOperationLogCleanupTask:每日凌晨 3:30 删除 30 天前 sys_operation_log 数据) - await ScheduleJobAsync("cleanup-log-job", "0 30 3 * * ?"); + // 1. 审计日志清理(对应 Java SysOperationLogCleanupTask:每日凌晨 1:00 删除 30 天前 sys_operation_log 数据; + // 设定时间窗口 0-2 点,取 1:00 居中) + await ScheduleJobAsync("cleanup-log-job", "0 0 1 * * ?"); // 2. 其他业务 Job 在此追加注册(示例:每 10 分钟执行一次) // await ScheduleJobAsync("job-name", "0 */10 * * * ?");