feat: Implement scheduled tasks management and budget archiving functionality
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 6s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 6s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
- Added BudgetArchiveJob for monthly budget archiving. - Created BudgetArchive entity and BudgetArchiveRepository for managing archived budgets. - Introduced JobController for handling job execution, pausing, and resuming. - Developed ScheduledTasksView for displaying and managing scheduled tasks in the frontend. - Updated PeriodicBillJob to improve scope handling. - Enhanced OpenAiService with increased HTTP timeout. - Added archiveBudgets API endpoint for archiving budgets by year and month. - Refactored BudgetController to utilize new repository patterns and improved error handling. - Introduced rich-content styles for better rendering of HTML content in Vue components. - Updated various Vue components to support rich HTML content display.
This commit is contained in:
@@ -13,7 +13,9 @@ public static class Expand
|
||||
|
||||
// 配置邮件同步任务 - 每10分钟执行一次
|
||||
var emailJobKey = new JobKey("EmailSyncJob");
|
||||
q.AddJob<Service.Jobs.EmailSyncJob>(opts => opts.WithIdentity(emailJobKey));
|
||||
q.AddJob<Service.Jobs.EmailSyncJob>(opts => opts
|
||||
.WithIdentity(emailJobKey)
|
||||
.WithDescription("邮件同步任务"));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(emailJobKey)
|
||||
.WithIdentity("EmailSyncTrigger")
|
||||
@@ -22,12 +24,25 @@ public static class Expand
|
||||
|
||||
// 配置周期性账单任务 - 每天早上6点执行
|
||||
var periodicBillJobKey = new JobKey("PeriodicBillJob");
|
||||
q.AddJob<Service.Jobs.PeriodicBillJob>(opts => opts.WithIdentity(periodicBillJobKey));
|
||||
q.AddJob<Service.Jobs.PeriodicBillJob>(opts => opts
|
||||
.WithIdentity(periodicBillJobKey)
|
||||
.WithDescription("周期性账单任务"));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(periodicBillJobKey)
|
||||
.WithIdentity("PeriodicBillTrigger")
|
||||
.WithCronSchedule("0 0 6 * * ?") // 每天早上6点执行
|
||||
.WithDescription("每天早上6点执行周期性账单检查"));
|
||||
.WithDescription("每天早上6点执行周期性账单任务"));
|
||||
|
||||
// 配置预算归档任务 - 每个月1号晚11点执行
|
||||
var budgetArchiveJobKey = new JobKey("BudgetArchiveJob");
|
||||
q.AddJob<Service.Jobs.BudgetArchiveJob>(opts => opts
|
||||
.WithIdentity(budgetArchiveJobKey)
|
||||
.WithDescription("预算归档任务"));
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(budgetArchiveJobKey)
|
||||
.WithIdentity("BudgetArchiveTrigger")
|
||||
.WithCronSchedule("0 0 23 1 * ?") // 每个月1号晚11点执行
|
||||
.WithDescription("每个月1号晚11点执行预算归档"));
|
||||
});
|
||||
|
||||
// 添加 Quartz Hosted Service
|
||||
|
||||
Reference in New Issue
Block a user