using Dlhis.ScheduledTask.SyncSapInfo.Job; using Dlhis.ScheduledTask.TaskAssignment.Job; using Hangfire; using Kurisu.AspNetCore.Startup; namespace Dlhis.ScheduledTask.Packs; public class JobPack : BaseAppPack { public override int Order => 999; public override bool IsBeforeUseRouting { get; } public override void Invoke(IServiceProvider serviceProvider) { RecurringJob.AddOrUpdate("SyncSap", s => s.SyncOrgInfo(), "0 0 2 * * ?", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local }); RecurringJob.AddOrUpdate("SyncServerDateTime", s => s.RunAsync(), "0 0 0/1 * * ?", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local }); RecurringJob.AddOrUpdate("CreateGetAttendance", s => s.RunAsync(), "0 0/1 * * * ?", new RecurringJobOptions { TimeZone = TimeZoneInfo.Local }); } }