Foros de discusión
Create a new scheduler in a Liferay hook
Pepe Perez, modificado hace 11 años.
Create a new scheduler in a Liferay hook
New Member Mensajes: 14 Fecha de incorporación: 18/09/12 Mensajes recientes
Hi,
I need to create a new scheduler in Liferay 6.1.1 to execute a process every night at 3:00 AM, but I would like to do it in a new hook, not in a portlet. Please, is there any easy way to do this?
Thanks.
Regards.
I need to create a new scheduler in Liferay 6.1.1 to execute a process every night at 3:00 AM, but I would like to do it in a new hook, not in a portlet. Please, is there any easy way to do this?
Thanks.
Regards.
David H Nebinger, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Not in a hook, no. You could do it via an EXT, but not a hook.
Hitoshi Ozawa, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Is there a reason that you don't want to create a portlet instead of a hook? You're essentially adding a new functionality. It's possible to hard code the 3:00 AM but it's really better to create a configuration page where admin can set the time.
Pepe Perez, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
New Member Mensajes: 14 Fecha de incorporación: 18/09/12 Mensajes recientes
Ok, if I do it with a portlet, is there any way to start the scheduler when Liferay is deployed?
Sorry if my question is kind of weird. I'm a beginner in this.
Thanks.
Regards.
Sorry if my question is kind of weird. I'm a beginner in this.
Thanks.
Regards.
Hitoshi Ozawa, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientesOk, if I do it with a portlet, is there any way to start the scheduler when Liferay is deployed?
What do you mean "Liferay is deployed"? Are you deploying liferay war file? Can just deploy the portlet war after deploying liferay war file.
If you mean when liferay is started, don't see any problem with using portlet.
Vilmos Papp, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Hi,
Please check http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd and examine scheduler-entry element. If you specify it you can set your own scheduler for your portlet with the scheduling as well:
Regards,
Vilmos
Please check http://www.liferay.com/dtd/liferay-portlet-app_6_2_0.dtd and examine scheduler-entry element. If you specify it you can set your own scheduler for your portlet with the scheduling as well:
<scheduler-entry>
<scheduler-event-listener-class>com.mycompany.portlet.test.TestPortlet</scheduler-event-listener-class>
<trigger>
<cron>
<cron-trigger-value>0 0/1 * 1/1 * ? *</cron-trigger-value>
</cron>
</trigger>
</scheduler-entry>
Regards,
Vilmos
Pepe Perez, modificado hace 11 años.
RE: Create a new scheduler in a Liferay hook
New Member Mensajes: 14 Fecha de incorporación: 18/09/12 Mensajes recientes
Done :-)
Thank you all.
Regards.
Thank you all.
Regards.