try adding the code below to spring -quartz.xml
<bean id="testAlertsTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="name" value="testAlertsTrigger" />
<property name="jobDetail" ref="testAlertsJobDetail" />
<property name="cronExpression" value="0 0 4 * * ?" />
</bean>
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="hbnTransactionManager" />
<property name="triggers">
<list>
<ref bean="testAlertsTrigger" />
</list>
</property>
<property name="schedulerContextAsMap">
<map>
<entry key="commandDispatcher" value-ref="commandDispatcher" />
</map>
</property>
<property name="autoStartup" value="${QUARTZ.org.quartz.autoStartup}" />
<property name="overwriteExistingJobs" value="${QUARTZ.org.quartz.overwriteExistingJobs}" />
<property name="quartzProperties">
<props>
<prop key="org.quartz.scheduler.instanceId">${QUARTZ.org.quartz.scheduler.instanceId}</prop>
<prop key="org.quartz.scheduler.instanceName">${QUARTZ.org.quartz.scheduler.instanceName}</prop>
<prop key="org.quartz.threadPool.threadCount">${QUARTZ.org.quartz.threadPool.threadCount}</prop>
<prop key="org.quartz.jobStore.class">${QUARTZ.org.quartz.jobStore.class}</prop>
<prop key="org.quartz.jobStore.isClustered">${QUARTZ.org.quartz.jobStore.isClustered}</prop>
<prop key="org.quartz.jobStore.clusterCheckinInterval">${QUARTZ.org.quartz.jobStore.clusterCheckinInterval}</prop>
</props>
</property>
</bean>
source
share