<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Multiple schedule jobs using the same Listener DXP 7.0</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121087785" />
  <subtitle>Multiple schedule jobs using the same Listener DXP 7.0</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121087785</id>
  <updated>2026-06-14T20:16:14Z</updated>
  <dc:date>2026-06-14T20:16:14Z</dc:date>
  <entry>
    <title>Multiple schedule jobs using the same Listener DXP 7.0</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121087784" />
    <author>
      <name>Uriel Flores Valdovinos</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121087784</id>
    <updated>2021-09-17T17:26:45Z</updated>
    <published>2021-08-30T22:46:38Z</published>
    <summary type="html">&lt;p&gt;Hello everyone! I have a requirement on which users should be able to
  schedule jobs, as of now I have already managed to create a schedule
  job dynamically, but as soon as other one is created the previous stop
  working. I'm using the same listener since the job is exactly the same
  just some parameters change from execution to execution but in general
  its the same action. Here's a snippet of my code:&lt;/p&gt;
&lt;p&gt;@Reference&lt;br /&gt; EnvioNotificacionMessageListener envioNotificacion;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;String listenerClass = EnvioNotificacionMessageListener.&lt;b&gt;class&lt;/b&gt;.getName();&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;    Trigger jobTrigger = _triggerFactory.createTrigger(&lt;/p&gt;
&lt;p&gt;        &amp;quot;Schedule Job Notificacion &amp;quot; + notificacion.getIdNotificacion(),&lt;/p&gt;
&lt;p&gt;        listenerClass, &lt;b&gt;new&lt;/b&gt; Date(), fechaFin, &amp;quot;0 * * ? * * *&amp;quot;);&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;    SchedulerEntryImpl schedulerEntryImpl = &lt;b&gt;new&lt;/b&gt; SchedulerEntryImpl();&lt;/p&gt;
&lt;p&gt;        schedulerEntryImpl.setEventListenerClass(listenerClass);&lt;/p&gt;
&lt;p&gt;        schedulerEntryImpl.setTrigger(jobTrigger);&lt;/p&gt;
&lt;p&gt;       &lt;/p&gt;
&lt;p&gt;        Message message = &lt;b&gt;new&lt;/b&gt; Message();&lt;/p&gt;
&lt;p&gt;        message.put(&amp;quot;idNotificacion&amp;quot;, notificacion.getIdNotificacion());&lt;/p&gt;
&lt;p&gt;             &lt;/p&gt;
&lt;p&gt;        SchedulerEngineHelperUtil.&lt;i&gt;schedule&lt;/i&gt;(jobTrigger, StorageType.&lt;b&gt;
    &lt;i&gt;PERSISTED&lt;/i&gt;&lt;/b&gt;,&lt;/p&gt;
&lt;p&gt;        &amp;quot;Trabajo&amp;quot;, DestinationNames.&lt;b&gt;
    &lt;i&gt;SCHEDULER_DISPATCH&lt;/i&gt;&lt;/b&gt;, message, 10);&lt;/p&gt;
&lt;p&gt;              &lt;/p&gt;
&lt;p&gt;        SchedulerEngineHelperUtil.&lt;i&gt;register&lt;/i&gt;(envioNotificacion,&lt;/p&gt;
&lt;p&gt;        schedulerEntryImpl, DestinationNames.&lt;b&gt;
    &lt;i&gt;SCHEDULER_DISPATCH&lt;/i&gt;&lt;/b&gt;);&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Hope you could help me to figure out what I need to change to finish
  this, thanks in advance!&lt;/p&gt;</summary>
    <dc:creator>Uriel Flores Valdovinos</dc:creator>
    <dc:date>2021-08-30T22:46:38Z</dc:date>
  </entry>
</feed>
