没有<xml> node?</​​ xml>的.config文件配置

时间:2013-12-12 09:24:00

标签: c# quartz-scheduler quartz.net

我在visual studio 2010中配置了一个qutartz.config文件,但内容是这样的:

01.# You can configure your scheduler in either <quartz> configuration section  
02.# or in quartz properties file  
03.# Configuration section has precedence  
04.  
05.quartz.scheduler.instanceName = ServerScheduler  
06.  
07.# configure thread pool info  
08.quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz  
09.quartz.threadPool.threadCount = 10  
10.quartz.threadPool.threadPriority = Normal  
11.  
12.# job initialization plugin handles our xml reading, without it defaults are used  
13.quartz.plugin.xml.type = Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz  
14.quartz.plugin.xml.fileNames = ~/quartz_jobs.xml  
15.  
16.# export this server to remoting context  
17.quartz.scheduler.exporter.type = Quartz.Simpl.RemotingSchedulerExporter, Quartz  
18.quartz.scheduler.exporter.port = 555  
19.quartz.scheduler.exporter.bindName = QuartzScheduler  
20.quartz.scheduler.exporter.channelType = tcp  
21.quartz.scheduler.exporter.channelName = httpQuartz 

我可以将它粘贴到.config文件中吗?

配置文件正常如下:

<?xml version="1.0" encoding="UTF-8"?>

..............

我怎么处理它?让它工作......

PS:qutartnet不是java中的qutart。

1 个答案:

答案 0 :(得分:2)

您不能只复制粘贴此设置,因为Quartz Scheduler的xml配置具有不同的(xml)格式:

<quartz>
  <add key="quartz.scheduler.instanceName" value="ServerScheduler" />
  <add key="quartz.threadPool.type" 
       value="Quartz.Simpl.SimpleThreadPool, Quartz" />
  <add key="quartz.threadPool.threadCount" value="10" />
  <add key="quartz.threadPool.threadPriority" value="Normal" />  
       value="Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz" />
  <add key="quartz.plugin.xml.fileNames" value="quartz_jobs.xml" />
  ...
</quartz>