Ado JobStore使用!

发布于 2024-08-25 12:17:41 字数 1222 浏览 3 评论 0原文

好吧,我是 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 文件夹中给出的表 谢谢。

well i'm new in Quartz i'm following this tutorial

and i configured my scheduler instance and quartz to use this properties:

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();

but what's next? i am new on C# but if someone explain to can understand :)

and my question are how i will add jobs and triggers and stuff to the database?

i also created the tables given in the Database/tables folder that comes with Quartz API
thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£冰雨忧蓝° 2024-09-01 12:17:41

对于谁来说:嗯,我问这个问题是因为我不知道 Quartz.net 提供了很多很好的例子:) 一旦你将属性 Collection 作为 StdSchedulerFactory 方法的参数,你就得到了你的调度程序,您所要做的就是像在 RamJobStore 上一样继续工作,作业或触发器将存储在数据库中而不是存储在 Ram 内存中:) 祝您好运!

For whom it may concerns: well, i asked this question because i didn't know that Quartz.net comes with a bunch of good examples :) once you give the properties Collection as an argument to the StdSchedulerFactory method, and you get your scheduler, all you have to do is to keep working as you are on RamJobStore, and the job or triggers will be stored in the database not on the Ram Memory :) good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文