【发布时间】:2011-06-05 16:51:31
【问题描述】:
我已经为 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 表中。我不知道出了什么问题。
有什么想法吗?
谢谢。
【问题讨论】:
标签: .net quartz-scheduler quartz.net