Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: how to replace deprecated SchedulerEntryImpl.setTrigger()?
Hi,
We are upgrading LR 7.0 to 7.2 and the uprade planner shows that SchedulerEntryImpl.setTrigger() is deprecated with no direct replacement!
The code is implemented same as https://liferay.dev/blogs/-/blogs/liferay-7-ce-liferay-dxp-scheduled-tasks
Could you point to me to the new implemenation I should use?
Has anyone else continued with the deprecated method and faced any issues in 7.2?
Hi ,
You can use deprecated method it should not cause any issue , as per
latest implementation you can try below code also. Refer
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;
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™