<?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:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.2.xsd">
<bean id="doExportExcel" class="com.sanss.excelreport.DoExportExcel"></bean>
<task:scheduled-tasks>
<!-- 时报-->
<task:scheduled ref="doExportExcel" method="doExportHourReport"
cron="0 0 1-2 * * ?" />
<!-- 日报 -->
<task:scheduled ref="doExportExcel" method="doExportDayReport"
cron="0 0 0 * * ?" />
<!-- 周报 -->
<task:scheduled ref="doExportExcel" method="doExportWeekReport"
cron="0 0 0/168 * * ?" />
<!-- 月报 -->
<task:scheduled ref="doExportExcel" method="doExportMonthReport"
cron="0 0 0 1 * ?" />
</task:scheduled-tasks>
</beans>
定时器触发方法执行函数配置
最新推荐文章于 2023-05-23 17:15:38 发布