I have used the quartz.net for scheduling the job. However, when I run the code, it is showing the error "SchedulerPlugin of type 'Quartz.Plugin.Xml.JobInitializationPlugin, Quartz' could not be instantiated".
Here the code
static void Main(string[] args)
{
IScheduler _scheduler = null;
ISchedulerFactory factory = new StdSchedulerFactory();
_scheduler = factory.GetScheduler();
_scheduler.Start();
Console.ReadLine();
}
This the app.config file
<configSections>
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<quartz>
<add key="quartz.scheduler.instanceName" value="QuartzScheduler" />
<!--
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<add key="quartz.threadPool.threadCount" value="10" />
<add key="quartz.threadPool.threadPriority" value="Normal" />
<!--
<add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz" />
<add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.JobInitializationPlugin, Quartz" />
<add key="quartz.plugin.xml.fileNames" value="~/quartzjobs.config" />
</quartz>
and this is the quartzjobs.config file
="1.0"="UTF-8"
<quartz xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" overwrite-existing-jobs="true">
<job>
<job-detail>
<name>MyJob</name>
<group>MyJobs</group>
<description>Logs a message to the application log</description>
<job-type>Sample.MyJob, Sample</job-type>
<volatile>false</volatile>
<durable>true</durable>
<recover>false</recover>
<job-data-map>
<entry>
<key>MessageToLog</key>
<value>Hello from MyJob</value>
</entry>
</job-data-map>
</job-detail>
<trigger>
<cron>
<name>MyJobTrigger</name>
<group>MyJobs</group>
<description>A description</description>
<job-name>MyJob</job-name>
<job-group>MyJobs</job-group>
<cron-expression>0 0/1 * * * ?</cron-expression>
</cron>
</trigger>
</job>
</quartz>