问题描述
执行这一步骤时提示的异常ISchedulerFactoryschedulerFactory=newStdSchedulerFactory();scheduler=schedulerFactory.GetScheduler();
解决方案
解决方案二:
无法绑定到远程调度。
解决方案三:
提示“无法绑定到远程调度。”具体是什么原因呢??????需要修改什么地方<?xmlversion="1.0"encoding="UTF-8"?><!--Thisfilecontainsjobdefinitionsinschemaversion2.0format--><job-scheduling-dataxmlns="http://quartznet.sourceforge.net/JobSchedulingData"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"version="2.0"><processing-directives><overwrite-existing-data>true</overwrite-existing-data></processing-directives><schedule><!--定义示例任务1Job--><job><name>DemoJob1</name><group>DeomJobGroup</group><description>Quartz.Net示例任务1</description><job-type>Quartz.Net.Service.DemoJob1,Quartz.Net.Service</job-type><durable>true</durable><recover>false</recover></job><!--定义示例任务2Job--><job><name>DemoJob2</name><group>DeomJobGroup</group><description>Quartz.Net示例任务2</description><job-type>Quartz.Net.Service.DemoJob2,Quartz.Net.Service</job-type><durable>true</durable><recover>false</recover></job><!--定义示例任务1触发器每30秒执行一次DemoJob1任务--><trigger><cron><name>DemoJob1Trigger</name><group>DeomJobTriggerGroup</group><job-name>DemoJob1</job-name><job-group>DeomJobGroup</job-group><cron-expression>0/3****?</cron-expression></cron></trigger><!--定义示例任务2触发器每分钟执行一次DemoJob2任务--><trigger><cron><name>DemoJob2Trigger1</name><group>DeomJobTriggerGroup</group><job-name>DemoJob2</job-name><job-group>DeomJobGroup</job-group><cron-expression>0****?</cron-expression></cron></trigger><!--定义示例任务2触发器每天凌晨01:00执行一次DemoJob2任务--><trigger><cron><name>DemoJob2Trigger2</name><group>DeomJobTriggerGroup</group><job-name>DemoJob2</job-name><job-group>DeomJobGroup</job-group><cron-expression>001**?</cron-expression></cron></trigger></schedule></job-scheduling-data>
#Youcanconfigureyourschedulerineither<quartz>configurationsection#orinquartzpropertiesfile#Configurationsectionhasprecedencequartz.scheduler.instanceName=ServerScheduler(此处的事例名我需要修改吗?)#configurethreadpoolinfoquartz.threadPool.type=Quartz.Simpl.SimpleThreadPool,Quartzquartz.threadPool.threadCount=10quartz.threadPool.threadPriority=Normal#jobinitializationpluginhandlesourxmlreading,withoutitdefaultsareusedquartz.plugin.xml.type=Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin,Quartzquartz.plugin.xml.fileNames=~/quartz_jobs.xml#exportthisservertoremotingcontextquartz.scheduler.exporter.type=Quartz.Simpl.RemotingSchedulerExporter,Quartzquartz.scheduler.exporter.port=555quartz.scheduler.exporter.bindName=QuartzSchedulerquartz.scheduler.exporter.channelType=tcpquartz.scheduler.exporter.channelName=httpQuartz
解决方案四:
你可能没有引用Common.Logging
解决方案五:
与这段配置有关:#exportthisservertoremotingcontextquartz.scheduler.exporter.type=Quartz.Simpl.RemotingSchedulerExporter,Quartzquartz.scheduler.exporter.port=555quartz.scheduler.exporter.bindName=QuartzSchedulerquartz.scheduler.exporter.channelType=tcpquartz.scheduler.exporter.channelName=httpQuartz
它的Remoting功能要绑定端口,你的555端口已经被占用了。可能是别的程序占用,也可能是你用同样的配置开了两个实例。