This commit is contained in:
SunCheng
2026-02-02 11:07:34 +08:00
parent 61916dc6da
commit 460dcd17ef
9 changed files with 9695 additions and 4967 deletions

View File

@@ -66,6 +66,17 @@ public static class Expand
.WithIdentity("LogCleanupTrigger")
.WithCronSchedule("0 0 2 * * ?") // 每天凌晨2点执行
.WithDescription("每天凌晨2点执行日志清理(保留30天)"));
// 配置分类图标生成任务 - 每24小时执行一次
var categoryIconJobKey = new JobKey("CategoryIconGenerationJob");
q.AddJob<CategoryIconGenerationJob>(opts => opts
.WithIdentity(categoryIconJobKey)
.WithDescription("分类图标生成任务"));
q.AddTrigger(opts => opts
.ForJob(categoryIconJobKey)
.WithIdentity("CategoryIconGenerationTrigger")
.WithCronSchedule("0 0 0 * * ?") // 每24小时执行一次
.WithDescription("每24小时扫描并为无图标分类生成SVG图标"));
});
// 添加 Quartz Hosted Service