IoTSharp/SilkierQuartz

XMLSchedulingDataProcessorPlugin

JayYa opened this issue · 3 comments

JayYa commented

Can I use XMLSchedulingDataProcessorPlugin to init jobs without AddQuartzJob and SilkierQuartzAttribute?

services.AddSilkierQuartz(options =>
            {
                options.Add("quartz.plugin.jobInitializer.type", "Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz.Plugins");
                options.Add("quartz.plugin.jobInitializer.fileNames", "~/quartz_jobs.config");
                options.Add("quartz.plugin.jobInitializer.failOnFileNotFound", "true");
                options.Add("quartz.plugin.recentHistory.type", "Quartz.Plugins.RecentHistory.ExecutionHistoryPlugin, Quartz.Plugins.RecentHistory");
                options.Add("quartz.plugin.recentHistory.storeType", "Quartz.Plugins.RecentHistory.Impl.InProcExecutionHistoryStore, Quartz.Plugins.RecentHistory");
            });

Error: Object reference not set to an instance of an object.

Maybe

I haven't tested it

JayYa commented

I haven't tested it

我试过了,管理页面能看到xml配置里的Job和Trigger,也会执行,但因为没有调用 AddQuartzJob,Job实例无法生成,会报 Object reference not set to an instance of an object. 错误。
现在的代码对原来的Quartz侵入有点强...依赖注入这一块都替换了,原来的部分功能也被移除了