无关风月
2025-05-03 d0b4191c913f487c5fe78b12398645c4660be22f
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
29
30
31
32
package com.ruoyi.jianguan.util;
 
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
import java.time.LocalDateTime;
 
 
/**
 * @author zhibing.pu
 * @date 2023/7/11 8:39
 */
@Component
public class GovernmentCloudTask {
 
 
 
 
 
 
    // 每天早上9点执行的定时任务
    @Scheduled(cron = "0 0 9 * * ?")
    public void taskMonth() {
        LocalDateTime start = LocalDateTime.now();
        LocalDateTime end = LocalDateTime.now().minusDays(1);
 
    }
 
 
 
}