반응형
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- docker compose mysql
- Netty
- cassandra
- mybatis
- WebLogic
- grafana
- spring boot
- argo cd
- redis
- RabbitMQ
- Docker Compose
- Selenium
- docker
- KAFKA
- netflix oss
- JPA
- MySQL
- QueryDSL
- Redis Sentinel
- vue.js
- ChannelPipeline
- coalesce
- jmeter
- Hibernate
- spring cloud
- Airflow
- spring boot redis
- weblogic 10
- docker-compose
- Spring Open Feign
Archives
- Today
- Total
IT.FARMER
Spring Quartz 1-2 본문
반응형
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="sdTimerQuartz" class="com.dongbu.farm.system.schedule.SDTimerQuartz"></bean>
<bean name="businessJobTimer" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass" >
<value>com..dongbu.farm.schedule.que.ExampleJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="timeout" value="5" /><!-- 5 sec-->
</map>
</property>
</bean>
<bean id="employTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<!--//see the example of method invoking job above 1초 늦게 실행해서 매 5초마다 실행 -->
<property name="jobDetail" ref="businessJobTimer" />
<!--//1 seconds -->
<property name="startDelay" value="1000" />
<!--// repeat every 5 seconds -->
<property name="repeatInterval" value="5000" />
</bean>
<bean id="sdMethodInvokingJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="sdTimerQuartz" />
<property name="targetMethod" value="init" />
<property name="concurrent" value="false" />
</bean>
<bean id="sdCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="sdMethodInvokingJobDetail" />
<property name="cronExpression" value="0 0 5 * * ?" /><!-- run every morning at 5 AM -->
</bean>
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref bean="employTrigger" />
<ref bean="sdCronTrigger" />
</list>
</property>
</bean>
</beans>
반응형
'Spring' 카테고리의 다른 글
spring annotation (0) | 2011.03.30 |
---|---|
Spring Annotation 사용방법 (0) | 2011.03.14 |
Spring Quartz 1-1 (0) | 2010.12.14 |
Spring Timer Sample (0) | 2010.12.14 |
Ibitis ResultMap XML 자동 생성하기. (0) | 2010.09.14 |