gpt4 book ai didi

c# - 废话 JobStore 使用!

转载 作者:太空宇宙 更新时间:2023-11-03 14:31:44 24 4
gpt4 key购买 nike

嗯,我是 Quartz 的新手,我正在关注 this tutorial

并且我配置了我的调度程序实例和 quartz 以使用此属性:

properties["quartz.jobStore.lockHandler.type"] = "Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";
properties["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz";
properties["quartz.jobStore.dataSource"] = "default";
properties["quartz.dataSource.default.connectionString"] = "Server=loclahost;Initial Catalog=aleo;Persist Security Info=True;User ID=userid;Password=password";
properties["quartz.dataSource.default.provider"] = "SqlServer-20";
properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
properties["quartz.jobStore.useProperties"] = "true";
properties["quartz.jobStore.tablePrefix"] = "QRTZ_";

ISchedulerFactory schedFact = new Quartz.Impl.StdSchedulerFactory(properties);
IScheduler sched = schedFact.GetScheduler();
sched.Start();

但是接下来呢?我是 C# 的新手,但如果有人解释可以理解 :)

我的问题是如何向数据库添加作业、触发器和内容?

我还创建了 Quartz API 附带的 Database/tables 文件夹中给出的表谢谢。

最佳答案

它可能关注的对象:好吧,我问这个问题是因为我不知道 Quartz.net 有很多很好的例子 :) 一旦你将属性 Collection 作为 StdSchedulerFactory 方法的参数,你得到你的调度器,你所要做的就是像在 RamJobStore 上一样继续工作,作业或触发器将存储在数据库中而不是 Ram 内存中:)祝你好运!

关于c# - 废话 JobStore 使用!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2426433/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com