From 1d4b60894fa7221749a3eb7c88ef3059dda6732f Mon Sep 17 00:00:00 2001 From: mengff <1198151809@qq.com> Date: Tue, 9 Jan 2024 09:03:16 +0800 Subject: [PATCH] =?UTF-8?q?----=E4=BF=AE=E6=94=B9=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/device/controller/DeviceStatus.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/device/controller/DeviceStatus.java b/src/main/java/com/example/device/controller/DeviceStatus.java index 9212915..c9b1d4b 100644 --- a/src/main/java/com/example/device/controller/DeviceStatus.java +++ b/src/main/java/com/example/device/controller/DeviceStatus.java @@ -171,7 +171,7 @@ public class DeviceStatus { * */ - @Scheduled(cron = "0 5 1 * * ?") + @Scheduled(cron = "0 30 23 * * ?") public void calculateSuccessRate() { LocalDateTime todayStart = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS); @@ -193,7 +193,7 @@ public class DeviceStatus { LocalDateTime dateTime = LocalDateTime.now(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); String formattedDateTime = dateTime.format(formatter); - String filePath = "/Users/mengfanfeng/Downloads/excel/"+formattedDateTime+"--deviceStatus.xlsx"; + String filePath = "/home/excel/"+formattedDateTime+"--deviceStatus.xlsx"; try (Workbook workbook = new XSSFWorkbook()) { FileOutputStream fileOut = new FileOutputStream(filePath); workbook.write(fileOut);