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
com.sample.scheduler.SchedulerClass
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
Post a Comment