123456789101112131415161718192021222324252627282930313233 |
- package com.malk.luyi.controller;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import org.springframework.scheduling.annotation.Scheduled;
- @Slf4j
- @Configuration
- @EnableScheduling
- public class KSJC_timer {
- @Autowired
- private KSJCController legalEntityService;
- /*集晨判断是否能打卡*/
- //每天早晨7点05分同步数据
- @Scheduled(cron = "0 5 7 * * ?")
- // @Scheduled(fixedRate = 5000)
- public void LegalEntityList(){
- log.info("k");
- try{
- legalEntityService.insetTHXM_TMER();
- System.out.println("集晨判断,同步完成");
- }catch (Exception e){
- //记录错误信息
- e.printStackTrace();
- }
- }
- }
|