public QuartzHostedService( ISchedulerFactory schedulerFactory, QuartzHostedServiceOptions options) { this.schedulerFactory = schedulerFactory; this.options = options; }
public QuartzHostedService( ISchedulerFactory schedulerFactory, SchedulerHealthCheck healthCheck, QuartzHostedServiceOptions options) { this.schedulerFactory = schedulerFactory; this.healthCheck = healthCheck; this.options = options; }
public QuartzHostedService( ISchedulerFactory schedulerFactory, QuartzHostedServiceOptions options ) { this.schedulerFactory = schedulerFactory; this.options = options; Log.Information("QuartzHostedService Constructor"); }
public static IServiceCollection AddQuartzHostedService( this IServiceCollection services, Action <QuartzHostedServiceOptions>?configure = null) { return(services.AddSingleton <IHostedService>(serviceProvider => { var scheduler = serviceProvider.GetRequiredService <ISchedulerFactory>(); var options = new QuartzHostedServiceOptions(); configure?.Invoke(options); return new QuartzHostedService(scheduler, options); })); }