Created
March 27, 2013 14:33
-
-
Save isergey/5254624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd"> | |
<bean id="springTask" class="task.SpringTask" /> | |
<bean id="exampleBusinessObject" class="examples.ExampleBusinessObject"/> | |
<bean id="jobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> | |
<property name="targetObject" ref="exampleBusinessObject" /> | |
<property name="targetMethod" value="doIt" /> | |
<property name="concurrent" value="false" /> | |
</bean> | |
<bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerFactoryBean"> | |
<!-- see the example of method invoking job above --> | |
<property name="jobDetail" ref="jobDetail" /> | |
<!-- 10 seconds --> | |
<property name="startDelay" value="1000" /> | |
<!-- repeat every 50 seconds --> | |
<property name="repeatInterval" value="1000" /> | |
</bean> | |
<bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> | |
<property name="jobDetail" ref="jobDetail" /> | |
<!-- run every morning at 6 AM --> | |
<property name="cronExpression" value="0 0 6 * * ?" /> | |
</bean> | |
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> | |
<property name="triggers"> | |
<list> | |
<ref bean="cronTrigger" /> | |
<ref bean="simpleTrigger" /> | |
</list> | |
</property> | |
</bean> | |
<task:annotation-driven executor="consolidationExecutor" scheduler="consolidationScheduler" /> | |
<task:executor id="consolidationExecutor" pool-size="1" /> | |
<task:scheduler id="consolidationScheduler" pool-size="1" /> | |
</beans> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment