Lotteries

This commit is contained in:
2025-10-24 01:34:18 +08:00
parent 15954dbfe2
commit 7385caff9a
11 changed files with 3235 additions and 2 deletions

View File

@@ -66,6 +66,13 @@ public static class ScheduledJobsConfiguration
.WithIntervalInHours(1)
.RepeatForever())
);
var lotteryDrawJob = new JobKey("LotteryDraw");
q.AddJob<Lotteries.LotteryDrawJob>(opts => opts.WithIdentity(lotteryDrawJob));
q.AddTrigger(opts => opts
.ForJob(lotteryDrawJob)
.WithIdentity("LotteryDrawTrigger")
.WithCronSchedule("0 0 0 * * ?"));
});
services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);