Commit 7f85d3ba authored by zhangwanglin's avatar zhangwanglin

定时test

parent bef35c63
...@@ -21,20 +21,16 @@ public class SrvTaskScheduledController { ...@@ -21,20 +21,16 @@ public class SrvTaskScheduledController {
@Autowired @Autowired
private SrvTaskService srvTaskService; private SrvTaskService srvTaskService;
@Scheduled(cron = "30 59 21 * * ?") @Scheduled(cron = "0 10 11 * * ?")
public void timeAllocationSrvTask() { public void timeAllocationSrvTask() {
log.info("timeAllocationSrvTask========start"); log.info("timeAllocationSrvTask========start");
srvTaskService.timeAllocationSrvTask(); srvTaskService.timeAllocationSrvTask();
log.info("timeAllocationSrvTask========end:{}"); log.info("timeAllocationSrvTask========end:{}");
} }
@Scheduled(cron = "30 45 21 * * ?") @Scheduled(cron = "*/5 * * * * ?")
public void test111() { public void test111() {
log.info("timeAllocationSrvTask========start"); log.info("test111===============================================");
srvTaskService.timeAllocationSrvTask();
log.info("timeAllocationSrvTask========end:{}");
} }
} }
package com.hungraim.ltc.component;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* @author zwl
* @ClassName ScheduledTask
* @description
* @date 2023/3/10 10:49
**/
@Component
@Slf4j
public class ScheduledTask {
@Scheduled(cron = "0 05 11 * * ?")
public void ScheduledTaskSystem() {
log.info("ScheduledTaskSystem========start===========");
}
@Scheduled(cron = "0 * /1 * * * ?")
public void test111() {
log.info("test111===============================================");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment