Following are the steps to schedule the job in Liferay 6.
1. Implement a class that will implement MessageListener Interface.
2. Then we need to tell liferay to run this job. So you add the following to your liferay-portlet.xml:
3. We need an actual portlet to attach this "scheduler-entry" to. So we also need the portlet.xml as usual.
Its Done!!!
1. Implement a class that will implement MessageListener Interface.
2. Then we need to tell liferay to run this job. So you add the following to your liferay-portlet.xml:
3. We need an actual portlet to attach this "scheduler-entry" to. So we also need the portlet.xml as usual.
Its Done!!!
hello, good blog, and an excellent understand! one for my favorites.
ReplyDeleteThanks, Keep posting and sharing...
ReplyDeletethis post should anyone print out and put on every bicycle in the world
ReplyDeleteThanks Ortensia...
ReplyDeleteHey guy
ReplyDeletewhenever i am configuring scheduler entry in liferay-portlet.xml i get error like portlet must match scheduler-entry tag.
Please solve it
Hello Davendra,
ReplyDeleteMake sure you are adhering to liferay-portlet.xml dtd rules and you are using Liferay 6 as Scheduling implementation has been changed a lot from liferay 5.2 to Liferay 6.
Here you can find the liferay-portlet.xml dtd for Liferay 6
http://docs.liferay.com/portal/6.0/definitions/liferay-portlet-app_6_0_0.dtd.org.html
Regards
How do I set more than one schedulers for a given portal ?
ReplyDeleteI came across the same problem as stated above by Devendra.
ReplyDeleteAlso tried copy & paste code from this blog but no luck.
I'm using Liferay 6.0.6 CE and following is my liferay-portlet.xml
---------------------------------------------------------------------------------------------
SamplePortlet
true
false
test
com.sample.scheduler.MailScheduler
1
minute
-------------------------------------------------------------------------------------------------------
Just figured it out.
ReplyDeleteNeed to change the element sequence.
tag should be before and
BTW, thanks for the blog.
[...] and check every midnight for the same. More about how to create schedulers in liferay is here http://www.liferaying.com/job-scheduling-in-liferay-6/ Flag Please sign in to flag this as [...]
ReplyDelete