Quartz.Net XML配置开始时间/结束时间

时间:2015-04-14 19:12:29

标签: c# xml quartz-scheduler quartz.net

我正在尝试在quartz_jobs.xml中设置一个触发器,该触发器在上午8:05启动作业,并在今天星期一到星期五的12:10结束。作业不重复,作业正在获取连续数据。 知道怎么做吗?我可以使用简单的触发器来执行此操作,因为cron触发器无法控制结束时间吗?

我想要这样的东西,但我不知道语法:

<start-time>todayT08:05:00.0Z</start-time>
<end-time>todayT12:10:00.0Z</end-time>

在下面找到我尝试的不起作用的代码:

<job>
  <name>simplejob</name>
  <group>jobGroup1</group>
  <description>jobDesciption1</description>
  <job-type>BigBrother.ScheduledJobs.DataFeedJob, BigBrother</job-type>
  <durable>true</durable>
  <recover>false</recover>
  <job-data-map>
    <entry>
      <key>JobMapDataKey_HistRTD</key>
      <value>RTD</value>
    </entry>
    <entry>
      <key>JobMapDataKey_ParamaterFile</key>
      <value>Config\ParametersData_Test.csv</value>
    </entry>
  </job-data-map>
</job>

<trigger>
 <simple>
    <name>SimpleTrigger</name>
    <job-name>simplejob</job-name>
    <job-group>jobGroup1</job-group>
    <!-- It will run from Monday To Friday at 8:05 to 12:10PM-->
     <start-time>2015-04-14T08:05:00.0Z</start-time>
    <end-time>2015-04-14T12:10:00.0Z</end-time>
    <misfire-instruction>SmartPolicy</misfire-instruction>
  </simple>
</trigger>

0 个答案:

没有答案