Reading the scheduler value from the properties file



In liferay if we want to schedule,then we  write the enries in the liferay-portlet.xml

Here we are hard code the value. What if cronValue is retreving the from the portlet.properties

Yes we can reterive the value from the propeties , here is the code snippets,

liferay-portlet.xml


scheduler entry

com.sample.scheduler.SchedulerClass



cronValue








Create the properties file in the /your-portlet/docroot/WEB-INF/src/

Portlet.properties

##cron value ##

cronValue = 0/1 1/1 * 1*


Here in liferay-portlet.xml we have set the key  "cronValue" in the element of property-key


Comments

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate