33 lines
995 B
C#
33 lines
995 B
C#
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<SyncOrganizationJob>("SyncSap", s => s.SyncOrgInfo(), "0 0 2 * * ?", new RecurringJobOptions
|
|
{
|
|
TimeZone = TimeZoneInfo.Local
|
|
});
|
|
|
|
RecurringJob.AddOrUpdate<CreateSyncServerDateTimeJob>("SyncServerDateTime", s => s.RunAsync(), "0 0 0/1 * * ?", new RecurringJobOptions
|
|
{
|
|
TimeZone = TimeZoneInfo.Local
|
|
});
|
|
|
|
|
|
RecurringJob.AddOrUpdate<CreateGetAttendanceJob>("CreateGetAttendance", s => s.RunAsync(), "0 0/1 * * * ?", new RecurringJobOptions
|
|
{
|
|
TimeZone = TimeZoneInfo.Local
|
|
});
|
|
}
|
|
}
|