1
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
SunCheng
2026-01-21 11:58:48 +08:00
parent a2bfff5790
commit c2a27abcac
2 changed files with 81 additions and 0 deletions

View File

@@ -44,6 +44,17 @@ public static class Expand
.WithIdentity("BudgetArchiveTrigger")
.WithCronSchedule("0 0 23 1 * ?") // 每个月1号晚11点执行
.WithDescription("每个月1号晚11点执行预算归档"));
// 配置数据库备份任务 - 每天早上6点执行
var dbBackupJobKey = new JobKey("DbBackupJob");
q.AddJob<DbBackupJob>(opts => opts
.WithIdentity(dbBackupJobKey)
.WithDescription("数据库备份任务"));
q.AddTrigger(opts => opts
.ForJob(dbBackupJobKey)
.WithIdentity("DbBackupTrigger")
.WithCronSchedule("0 0 6 * * ?") // 每天早上6点执行
.WithDescription("每天早上6点执行数据库备份"));
});
// 添加 Quartz Hosted Service