出于某种原因,在我召集并启动以下零SizeThreadPool Quartz.net列表器时,CPU的使用率非常高,使计算机反应不灵。 是否有人想为什么会发生这种情况以及如何解决问题? TIA.
var properties = new NameValueCollection();
properties["quartz.scheduler.instanceName"] = "MyScheduler";
properties["quartz.scheduler.instanceId"] = "instance_myscheduler";
properties["quartz.threadPool.type"] = "Quartz.Simpl.ZeroSizeThreadPool, Quartz";
properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
properties["quartz.jobStore.useProperties"] = "true";
properties["quartz.jobStore.dataSource"] = "default";
properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
properties["quartz.jobStore.clustered"] = "false";
properties["quartz.dataSource.default.connectionString"] = "Server=(local);Database=mydb;Uid=user;Pwd=pass;";
properties["quartz.dataSource.default.provider"] = "SqlServer-20";
schedFact = new StdSchedulerFactory(properties);
Scheduler = schedFact.GetScheduler();
Scheduler.Start();