| | |
| | | private static final Integer ThreadPoolMaxCount = 1 ;//线程池线程最大个数 |
| | | private static final Integer ThreadPoolPriority = 5 ;//线程优先级 |
| | | |
| | | /** |
| | | * 统计开始小时,必须0点或之后,见StatisticsJob中统计,日统计是统计昨天的 |
| | | */ |
| | | @Value("${auto-statistics.startHour: 0}") |
| | | protected Integer startHour;//统计开始小时 |
| | | |
| | |
| | | * 初始化 |
| | | */ |
| | | private void start(ApplicationReadyEvent event) throws Exception{ |
| | | if(startHour < 0 || startHour > 5){ |
| | | startHour = 0 ; |
| | | } |
| | | SchedulerTaskSupport.setThreadPoolPro(ThreadPoolMaxCount, ThreadPoolPriority); |
| | | SchedulerTaskSupport.addDailyJob(JobName, JobGroupName, StatisticsJob.class, null, startHour, startMinute ) ; |
| | | } |