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