java自动运行任务job---quartz的运用(1)
- UID
- 1066743
|
java自动运行任务job---quartz的运用(1)
用到的包
quartz
使用到的包:
quartz-2.2.1.jar
quartz-jobs-2.2.1.jar
spring-tx.4.0.0.jar
spring-context-support.4.0.0.jar
使用maven的话 pom.xml如下:
<!--自动运行quartz -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz-jobs</artifactId>
<version>2.2.1</version>
</dependency>
<!-- Spring + Quartz need transaction -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<!-- QuartzJobBean in spring-context-support.jar -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.0.RELEASE</version>
</dependency> |
|
|
|
|
|