<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [Feature] Custom Quartz Job and Trigger in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/feature-custom-quartz-job-and-trigger/m-p/322289#M9290</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It is currently not possible to customize the Quartz job and trigger created by the &lt;CODE&gt;SchedulerService&lt;/CODE&gt;, like adding &lt;CODE&gt;@DisallowConcurrentExecution&lt;/CODE&gt; to the job or changing the misfire behavior.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nuxeo/nuxeo/pull/1800"&gt;This PR&lt;/A&gt; adds an optional &lt;CODE&gt;jobFactoryClass&lt;/CODE&gt; attribute on the &lt;CODE&gt;schedule&lt;/CODE&gt; extension point of &lt;CODE&gt;SchedulerService&lt;/CODE&gt; allowing to customize the job and the trigger, falling back to the previous behavior if not specified.&lt;/P&gt;
&lt;P&gt;For example :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xml"&gt;&amp;lt;schedule id="testSchedulerSingleExecution"
	jobFactoryClass="org.nuxeo.ecm.core.scheduler.SingleExecutionEventJobFactory"&amp;gt;
  &amp;lt;event&amp;gt;testSchedulerSingleExecution&amp;lt;/event&amp;gt;
  &amp;lt;cronExpression&amp;gt;* * * * * ?&amp;lt;/cronExpression&amp;gt;
&amp;lt;/schedule&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class="language-java"&gt;public class SingleExecutionEventJobFactory extends DefaultEventJobFactory {
    @Override
    protected Class&amp;lt;? extends EventJob&amp;gt; getJobClass() {
        return SingleExecutionEventJob.class;
    }
}

@DisallowConcurrentExecution
public class SingleExecutionEventJob extends EventJob {
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://jira.nuxeo.com/browse/NXP-24540" target="test_blank"&gt;https://jira.nuxeo.com/browse/NXP-24540&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Mar 2018 15:52:34 GMT</pubDate>
    <dc:creator>Florent_M</dc:creator>
    <dc:date>2018-03-04T15:52:34Z</dc:date>
    <item>
      <title>[Feature] Custom Quartz Job and Trigger</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/feature-custom-quartz-job-and-trigger/m-p/322289#M9290</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It is currently not possible to customize the Quartz job and trigger created by the &lt;CODE&gt;SchedulerService&lt;/CODE&gt;, like adding &lt;CODE&gt;@DisallowConcurrentExecution&lt;/CODE&gt; to the job or changing the misfire behavior.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nuxeo/nuxeo/pull/1800"&gt;This PR&lt;/A&gt; adds an optional &lt;CODE&gt;jobFactoryClass&lt;/CODE&gt; attribute on the &lt;CODE&gt;schedule&lt;/CODE&gt; extension point of &lt;CODE&gt;SchedulerService&lt;/CODE&gt; allowing to customize the job and the trigger, falling back to the previous behavior if not specified.&lt;/P&gt;
&lt;P&gt;For example :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-xml"&gt;&amp;lt;schedule id="testSchedulerSingleExecution"
	jobFactoryClass="org.nuxeo.ecm.core.scheduler.SingleExecutionEventJobFactory"&amp;gt;
  &amp;lt;event&amp;gt;testSchedulerSingleExecution&amp;lt;/event&amp;gt;
  &amp;lt;cronExpression&amp;gt;* * * * * ?&amp;lt;/cronExpression&amp;gt;
&amp;lt;/schedule&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class="language-java"&gt;public class SingleExecutionEventJobFactory extends DefaultEventJobFactory {
    @Override
    protected Class&amp;lt;? extends EventJob&amp;gt; getJobClass() {
        return SingleExecutionEventJob.class;
    }
}

@DisallowConcurrentExecution
public class SingleExecutionEventJob extends EventJob {
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://jira.nuxeo.com/browse/NXP-24540" target="test_blank"&gt;https://jira.nuxeo.com/browse/NXP-24540&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Mar 2018 15:52:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/feature-custom-quartz-job-and-trigger/m-p/322289#M9290</guid>
      <dc:creator>Florent_M</dc:creator>
      <dc:date>2018-03-04T15:52:34Z</dc:date>
    </item>
  </channel>
</rss>

