/// <summary> /// Gaia schedulerl service plugin constructor /// </summary> public SchedulerPlugin() { _logger = new Logger <SchedulerPlugin>(new LoggerFactory()); var jobFactory = new IoCJobFactory(Container.Instance); _schedulerFactory = new IoCSchedulerFactory(jobFactory); }
/// <summary> /// Gaia schedulerl service plugin constructor /// </summary> public SchedulerPlugin() { _logger = LogManager.GetLogger(GetType()); var jobFactory = new IoCJobFactory(Container.Instance); _schedulerFactory = new IoCSchedulerFactory(jobFactory); }
public static async void AddQuartz(this IServiceCollection services) { var props = new NameValueCollection { { "quartz.serializer.type", "json" } }; var factory = new StdSchedulerFactory(props); var scheduler = await factory.GetScheduler(); var jobFactory = new IoCJobFactory(services.BuildServiceProvider()); scheduler.JobFactory = jobFactory; await scheduler.Start(); services.AddSingleton(scheduler); }