From b24276d40b00258085621d117656b28417bbf550 Mon Sep 17 00:00:00 2001 From: Sin Ye Rin <91180366+nyeroni@users.noreply.github.com> Date: Wed, 30 Oct 2024 13:37:05 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=95=8C=EB=A6=BC=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/yerong/wedle/WedleApplication.java | 2 ++ .../wedle/notification/service/NotificationService.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/yerong/wedle/WedleApplication.java b/src/main/java/yerong/wedle/WedleApplication.java index 11868dd..6902f4c 100644 --- a/src/main/java/yerong/wedle/WedleApplication.java +++ b/src/main/java/yerong/wedle/WedleApplication.java @@ -3,7 +3,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +import org.springframework.scheduling.annotation.EnableScheduling; +@EnableScheduling @EnableJpaAuditing @SpringBootApplication public class WedleApplication { diff --git a/src/main/java/yerong/wedle/notification/service/NotificationService.java b/src/main/java/yerong/wedle/notification/service/NotificationService.java index 4d872c8..e4bb208 100644 --- a/src/main/java/yerong/wedle/notification/service/NotificationService.java +++ b/src/main/java/yerong/wedle/notification/service/NotificationService.java @@ -72,7 +72,7 @@ private CalendarEvent getCalendarEventById(Long calendarId) { } @Transactional - @Scheduled(cron = "0 0 10 * * ?") + @Scheduled(cron = "0 40 14 * * ?") public void sendNotifications() { LocalDate today = LocalDate.now(); List dueNotifications = notificationRepository.findByNotificationDate(today); @@ -81,7 +81,7 @@ public void sendNotifications() { if (notification.isActive()) { List registrationTokens = notification.getRegistrationTokens(); String title = notification.getEvent().getTitle(); - String body = ""; + String body = "일정 당일입니다."; FcmUtils.broadCast(registrationTokens, title, body);