Skip to content

Commit

Permalink
Use Identity with Schedules to Prevent Duplicate Triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
da3dsoul committed Jan 8, 2024
1 parent a95d740 commit f79ffee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shoko.Server/Scheduling/QuartzStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal static void AddQuartz(this IServiceCollection services)

// Register the connectivity monitor job with a trigger that executes every 5 minutes
q.ScheduleJob<CheckNetworkAvailabilityJob>(
trigger => trigger.WithSimpleSchedule(tr => tr.WithIntervalInMinutes(5).RepeatForever()).StartNow(),
trigger => trigger.WithIdentity("UptimeMonitor", "System").WithSimpleSchedule(tr => tr.WithIntervalInMinutes(5).RepeatForever()).StartNow(),
j => j.DisallowConcurrentExecution().WithGeneratedIdentity());
});

Expand Down

0 comments on commit f79ffee

Please sign in to comment.