2021与蓝度共同重构项目,服务端
liuhaonan
2022-11-04 e55c8b0a92eb9715edd90c31dfd4de51a47b588b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.sandu.ximon.admin.schedule;
 
import com.sandu.ximon.admin.service.LightTaskService;
import com.sandu.ximon.admin.service.VnnoxService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
 
/**
 * 诺瓦更新分辨率
 */
 
@Component
@Slf4j
@AllArgsConstructor
@EnableScheduling
public class NovaInfoSchedule {
    private final VnnoxService vnnoxService;
 
    //每天00:09 开始执行
    @Scheduled(cron = "0 9 0 * * ? ")
    public void updateInfo() {
        vnnoxService.saveInfo();
    }
}