Quartz.net不持续每日时间间隔
我已经注意到石英NET并未将所有触发类型持续到数据库。例如,在每日间隔没有的情况下,cron触发器会持续存在。是否有设置可以允许持续到数据库的所有触发类型?
var props = new NameValueCollection
{
{"quartz.jobStore.type", "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" },
{"quartz.jobStore.lockHandler.type", "Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz"},
{"quartz.jobStore.useProperties", "true"},
{"quartz.jobStore.dataSource", "default"},
{"quartz.jobStore.tablePrefix", "QRTZ_"},
{"quartz.jobStore.driverDelegateType", "Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz"},
{"quartz.dataSource.default.provider", "SQLite"},
{"quartz.dataSource.default.connectionString", "Data Source=MyDBFile.db;Version=3;Foreign Keys=ON;"},
{"quartz.serializer.type", "json"},
{"quartz.scheduler.typeLoadHelper.type" , MyTypeLoadHelper },
{"quartz.plugin.recentHistory.type", "Quartz.Plugins.RecentHistory.ExecutionHistoryPlugin, Quartz.Plugins.RecentHistory" },
{"quartz.plugin.recentHistory.storeType", "Quartz.Plugins.RecentHistory.Impl.InProcExecutionHistoryStore, Quartz.Plugins.RecentHistory" },
{"quartz.serializer.type", "MySerializerType" }
};
services.AddSingleton<ISchedulerFactory>(new StdSchedulerFactory(props));
Update
如果您阻止石英处理,则每天的间隔将保存到DB。但是,一旦重复间隔一旦将其从数据库删除,即使它计划在多天进行运行。
I have noticed the Quartz.Net does not persist all trigger types to the data base. For example the CRON trigger gets persisted while the Daily Interval does not. Is there a setting to allow persisting all trigger types to the database?
var props = new NameValueCollection
{
{"quartz.jobStore.type", "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" },
{"quartz.jobStore.lockHandler.type", "Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz"},
{"quartz.jobStore.useProperties", "true"},
{"quartz.jobStore.dataSource", "default"},
{"quartz.jobStore.tablePrefix", "QRTZ_"},
{"quartz.jobStore.driverDelegateType", "Quartz.Impl.AdoJobStore.SQLiteDelegate, Quartz"},
{"quartz.dataSource.default.provider", "SQLite"},
{"quartz.dataSource.default.connectionString", "Data Source=MyDBFile.db;Version=3;Foreign Keys=ON;"},
{"quartz.serializer.type", "json"},
{"quartz.scheduler.typeLoadHelper.type" , MyTypeLoadHelper },
{"quartz.plugin.recentHistory.type", "Quartz.Plugins.RecentHistory.ExecutionHistoryPlugin, Quartz.Plugins.RecentHistory" },
{"quartz.plugin.recentHistory.storeType", "Quartz.Plugins.RecentHistory.Impl.InProcExecutionHistoryStore, Quartz.Plugins.RecentHistory" },
{"quartz.serializer.type", "MySerializerType" }
};
services.AddSingleton<ISchedulerFactory>(new StdSchedulerFactory(props));
UPDATE
If you stop Quartz from processing then Daily Interval is saved to the DB. However, once the repeat interval is done once it will delete it from the db, even though it is scheduled to run on multiple days.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论