AcqGoodsSeatSchedule06.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.emato.cus.supervise.schedule;
  2. import com.emato.cus.supervise.biz.acq06Seat.AcqGoodsSeatBiz06;
  3. import com.emato.cus.supervise.util.LocalDateTimeUtils;
  4. import org.slf4j.Logger;
  5. import org.slf4j.LoggerFactory;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.context.annotation.Configuration;
  8. import org.springframework.scheduling.annotation.EnableScheduling;
  9. import org.springframework.scheduling.annotation.Scheduled;
  10. /**
  11. * 库位货物数据 计划任务
  12. *
  13. * @author Scott Chen
  14. * @version 1.0
  15. * 2017-10-28 11:42
  16. */
  17. @Configuration
  18. @EnableScheduling
  19. public class AcqGoodsSeatSchedule06 {
  20. private static final Logger logger = LoggerFactory.getLogger(AcqGoodsSeatSchedule06.class);
  21. @Autowired
  22. private AcqGoodsSeatBiz06 acqGoodsSeatBiz06;
  23. /**
  24. * 库位货物数据
  25. * 每30分钟1次
  26. */
  27. //每月1号开始,每天10,12,15,18,22点各1次,共5次
  28. //@Scheduled(cron = "0 0 10,12,15,18,22 1/1 * ?")
  29. @Scheduled(cron = "0 0/10 * * * ?")
  30. public void timerUp() {
  31. logger.info("==================== 库位货物数据::监控数据读取开始 ====================");
  32. String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
  33. logger.info("--- 任务开始时间: {}", begDateTime);
  34. acqGoodsSeatBiz06.task();
  35. String endDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
  36. logger.info("--- 任务结束时间: {}", endDateTime);
  37. logger.info("==================== 库位货物数据::监控数据读取结束 ====================");
  38. }
  39. }