1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  | package com.dy.pmsOther.config; 
 |    
 |  import com.dy.common.schedulerTask.SchedulerTaskSupport; 
 |  import com.dy.pmsOther.task.DeviceCountTask; 
 |  import com.dy.pmsOther.task.WorkloadTask; 
 |  import lombok.extern.slf4j.Slf4j; 
 |  import org.springframework.boot.CommandLineRunner; 
 |  import org.springframework.stereotype.Component; 
 |    
 |  @Slf4j 
 |  @Component 
 |  public class AppStartupRunner implements CommandLineRunner { 
 |      @Override 
 |      public void run(String... args) throws Exception { 
 |          //每天人员工作量统计 
 |          SchedulerTaskSupport.addDailyJob("workloadTask", "station", WorkloadTask.class, 
 |                  null, 0, 5); 
 |          //每天完成设备数量统计 
 |          SchedulerTaskSupport.addDailyJob("deviceCountTask", "station", DeviceCountTask.class, 
 |                  null,23,50); 
 |      } 
 |  } 
 |  
  |