Commit bd5f992a authored by zhangwanglin's avatar zhangwanglin

定时test

parent 7f85d3ba
...@@ -21,7 +21,7 @@ public class SrvTaskScheduledController { ...@@ -21,7 +21,7 @@ public class SrvTaskScheduledController {
@Autowired @Autowired
private SrvTaskService srvTaskService; private SrvTaskService srvTaskService;
@Scheduled(cron = "0 10 11 * * ?") @Scheduled(cron = "0 30 03 * * ?")
public void timeAllocationSrvTask() { public void timeAllocationSrvTask() {
log.info("timeAllocationSrvTask========start"); log.info("timeAllocationSrvTask========start");
srvTaskService.timeAllocationSrvTask(); srvTaskService.timeAllocationSrvTask();
......
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