- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经为 Quartz.NET 创建了数据库。将其配置为以这种方式使用 AdoJobStore:
properties["quartz.scheduler.instanceName"] = "TestScheduler";
properties["quartz.scheduler.instanceId"] = "instance_one";
properties["quartz.threadPool.type"] =
"Quartz.Simpl.SimpleThreadPool, Quartz";
properties["quartz.threadPool.threadCount"] = "5";
properties["quartz.threadPool.threadPriority"] = "Normal";
properties["quartz.jobStore.misfireThreshold"] = "60000";
properties["quartz.jobStore.type"] =
"Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
properties["quartz.jobStore.useProperties"] = "true";
properties["quartz.jobStore.dataSource"] = "default";
properties["quartz.jobStore.tablePrefix"] = "Q";
properties["quartz.jobStore.clustered"] = "true";
// if running MS SQL Server we need this
properties["quartz.jobStore.lockHandler.type"] =
"Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";
properties["quartz.dataSource.default.connectionString"] =
"Server=.;Database=Test;Trusted_Connection=True;";
properties["quartz.dataSource.default.provider"] = "SqlServer-20";
ISchedulerFactory sf = new StdSchedulerFactory(properties);
IScheduler sched = sf.GetScheduler();
我在 JOB_DETAILS 表中添加了一个作业,并相应地在 TRIGGERS 和 CRONTRIGGERS 表中添加了一个触发器,但我的作业不会执行。我检查了 SQL Server Profiler,Quartz 执行的唯一查询是 SELECT * FROM QSchedulerState。我使用 sched.Start(); 启动调度程序,它不在 JOB_DETAILS 表中查找。我不知道出了什么问题。
有什么想法吗?
谢谢。
最佳答案
我同意 NinjaNye 的观点。您必须使用 API 提交作业,因为它需要在运行时绑定(bind)类的 namespace 。过程很simple :
// construct job info
JobDetail jobDetail = new JobDetail("myJob", null, typeof(HelloJob));
// fire every hour
Trigger trigger = TriggerUtils.MakeHourlyTrigger();
// start on the next even hour
trigger.StartTimeUtc = TriggerUtils.GetEvenHourDate(DateTime.UtcNow);
trigger.Name = "myTrigger";
sched.ScheduleJob(jobDetail, trigger);
如您所见,我们将作业类型传递给 JobDetail:typeof(HelloJob)
。调度程序将使用它在执行期间绑定(bind)我们的作业。
关于.net - Quartz.NET 和 AdoJobStore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6244358/
我已经为 Quartz.NET 创建了数据库。将其配置为以这种方式使用 AdoJobStore: properties["quartz.scheduler.instanceName"]
我已经为 Quartz.NET 创建了数据库。将其配置为以这种方式使用 AdoJobStore: properties["quartz.scheduler.instanceName"]
我终于能够为 Sql Server 设置 ADOJobStore,但我也希望它能与 Sqlite 一起使用,但我还没有让它工作。这是我的 quartz.config 的一部分,我为我的 AdoJobS
我正在尝试使用 AdoJobStore 来使用 Quartz API 安排作业。 这是应用程序配置文件的内容(作为 Windows 服务的一部分提供)。
你如何使用 Quartz.net 建立一个作业商店。他们在网站上的教程对我没有帮助。 在这个页面虽然有步骤 http://quartznet.sourceforge.net/tutorial/less
我正在使用 Quartz .NET 开发简单的调度程序。我想让 Quartz 保留数据库中的所有作业和触发器,所以我设置了 AdoJobStore 并使用“正常”作业,它工作正常。 现在,我在从数据库
我在尝试让 Quartz.NET 与 AdoJobStore 一起工作时遇到了问题。这里的其他问题似乎都没有遇到我的问题。我能够在没有 AdoJobStore 配置的情况下让它正常工作,但我想在最后保
.NET 4.51 Entity Framework 6.x 我有一个单独的项目/程序集,它包装了核心 Quartz.NET 功能。我想以编程方式配置 Quartz.NET 以将信息保存到 SQL S
我使用quartz.net 作为 Microsoft Azure Web 角色中的调度程序。如果我使用 RamDataStore,我可以让 Quartz.net 正常工作。但是,我想将其分为两个部分:
我是一名优秀的程序员,十分优秀!