Reputation: 291
How to dynamically create multiple CronTriggerBean beans.
My system currently uses a property file to get the times for running the job For example: SCHEDULE_TIME=09:30,10:55,17:35
Now, I will get these values and create cron expressions for them.
Now I want to create multiple CronTriggerBean beans with the cron expressions that I have with me.
How can I do it ?
Upvotes: 1
Views: 234
Reputation: 11
<bean id="crontestJobTriggerTradeCheck"
class="frameworkx.springframework.scheduling.quartz.InitializingCronTrigger">
<property name="jobDetail">
<ref bean="tradeCheck" />
</property>
</bean>
try to create class like InitializingCronTrigger extends CronTriggerFactoryBean .Set CronExpression in InitializingCronTrigger .
Upvotes: 1