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); } }