I'm trying to install quartz.net 2.2.4 and run a helloworld simple job. But I'm not able. quartz_jobs.xml is not parsed. It is obviously read but quartz fails to parse it. Log gives me the following error each time I try to launch scheduler in my console application.
ERROR | Error scheduling jobs: Error in xml document (2,2)
jobs.xml is a valid xml. moreover any other valid xml will give me the same error. If i try to feed quartz with invalid xml it shows something like
ERROR | Error scheduling jobs: Element XXX is missing an end tag
Please advise.
Here is app.config
<configSections>
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<quartz>
<add key="quartz.scheduler.instanceName" value="MySchedular" />
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="2" />
<add key="quartz.threadPool.threadPriority" value="2" />
<add key="quartz.jobStore.misfireThreshold" value="60000" />
<add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz" />
<add key="quartz.plugin.xml.fileNames" value="quartz_jobs.xml" />
My quartz_jobs.xml
<?xml version="1.0" encoding="UTF-8"?>
<job-scheduling-data
xmlns="http://ift.tt/1vzy0D6"
xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://ift.tt/1vzy0D6
http://ift.tt/1sssMqG"
version="1.8">
<schedule>
<job>
<name>SimpleJob</name>
<group>GroupDummy</group>
<description>This is a simple job</description>
<job-class>App.Scheduler.SimpleJob</job-class>
</job>
<trigger>
<cron>
<name>dummyTriggerNameA</name>
<job-name>JobA</job-name>
<job-group>GroupDummy</job-group>
<cron-expression>0/5 * * * * ?</cron-expression>
</cron>
</trigger>
</schedule>
</job-scheduling-data>
Here is Console Application Main
static void Main(string[] args)
{
ISchedulerFactory sf = new StdSchedulerFactory();
IScheduler sched = sf.GetScheduler();
sched.Start();
}
No comments:
Post a Comment