1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package com.emato.cus.supervise.schedule;
- import com.emato.cus.supervise.biz.acq06Seat.AcqGoodsSeatBiz06;
- import com.emato.cus.supervise.util.LocalDateTimeUtils;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import org.springframework.scheduling.annotation.Scheduled;
- /**
- * 库位货物数据 计划任务
- *
- * @author Scott Chen
- * @version 1.0
- * 2017-10-28 11:42
- */
- @Configuration
- @EnableScheduling
- public class AcqGoodsSeatSchedule06 {
- private static final Logger logger = LoggerFactory.getLogger(AcqGoodsSeatSchedule06.class);
- @Autowired
- private AcqGoodsSeatBiz06 acqGoodsSeatBiz06;
- /**
- * 库位货物数据
- * 每30分钟1次
- */
- //每月1号开始,每天10,12,15,18,22点各1次,共5次
- //@Scheduled(cron = "0 0 10,12,15,18,22 1/1 * ?")
- @Scheduled(cron = "0 0/10 * * * ?")
- public void timerUp() {
- logger.info("==================== 库位货物数据::监控数据读取开始 ====================");
- String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
- logger.info("--- 任务开始时间: {}", begDateTime);
- acqGoodsSeatBiz06.task();
- String endDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
- logger.info("--- 任务结束时间: {}", endDateTime);
- logger.info("==================== 库位货物数据::监控数据读取结束 ====================");
- }
- }
|