<?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>how to replace deprecated SchedulerEntryImpl.setTrigger()?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120543192" />
  <subtitle>how to replace deprecated SchedulerEntryImpl.setTrigger()?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120543192</id>
  <updated>2026-04-07T07:26:56Z</updated>
  <dc:date>2026-04-07T07:26:56Z</dc:date>
  <entry>
    <title>RE: how to replace deprecated SchedulerEntryImpl.setTrigger()?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120544966" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120544966</id>
    <updated>2021-01-11T19:02:21Z</updated>
    <published>2021-01-11T19:02:21Z</published>
    <summary type="html">&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;You can use deprecated method it should not cause any issue , as per
  latest implementation you can try below code also. &lt;a href="https://github.com/liferay/liferay-portal/blob/7.3.x/modules/apps/journal/journal-web/src/main/java/com/liferay/journal/web/internal/messaging/CheckArticleMessageListener.java"&gt;Refer &lt;/a&gt;&lt;br /&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;Trigger trigger = _triggerFactory.createTrigger(jobName, groupName, startDate, endDate, cronExpression)

SchedulerEntry schedulerEntry = new SchedulerEntryImpl(className, trigger);

_schedulerEngineHelper.register(messageListener, schedulerEntry, destinationName);

private SchedulerEngineHelper _schedulerEngineHelper;
@Reference
private TriggerFactory _triggerFactory;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2021-01-11T19:02:21Z</dc:date>
  </entry>
  <entry>
    <title>how to replace deprecated SchedulerEntryImpl.setTrigger()?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120543191" />
    <author>
      <name>Binu Purushothaman</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120543191</id>
    <updated>2021-01-07T22:56:59Z</updated>
    <published>2021-01-07T20:09:17Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We are upgrading LR 7.0 to 7.2 and the uprade planner shows
  that SchedulerEntryImpl.setTrigger() is deprecated with no direct replacement!&lt;/p&gt;
&lt;p&gt;The code is implemented same as https://liferay.dev/blogs/-/blogs/liferay-7-ce-liferay-dxp-scheduled-tasks&lt;/p&gt;
&lt;p&gt;Could you point to me to the new implemenation I should use?&lt;/p&gt;
&lt;p&gt;Has anyone else continued with the deprecated method and faced any
  issues in 7.2?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Binu Purushothaman</dc:creator>
    <dc:date>2021-01-07T20:09:17Z</dc:date>
  </entry>
</feed>
