posted 9 years ago
Hi,
I have written code using spring quartz scheduler and it is working fine. But, in that i have specified value of cron expression in applicationcontext.xml. So, i now need to read the value of CronExpression from properties file so that if we need to change the time of execution, we can just change properties file and restart the server.
<bean id="CronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="CronJob" />
<property name="cronExpression" value="0 0 3 * * ?" />
</bean>
I can't do
<bean id="CronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="CronJob" />
<property name="cronExpression" value="{cronExpression}" />
</bean>
because i don't have control over CronTriggerBean as it provided by Spring.
So, can anyone please tell how we can read the value of cronExpression from properties file.
--Raj