Skip to content

Commit 466cdaa

Browse files
authored
Merge pull request #43 from Isonade2/feature/image
fix: 알람 시간대 고정 - 알람아 가라 얍!
2 parents fc66e1b + 3e677fd commit 466cdaa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/njb/recipe/service/ExpirationNotificationService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ public ExpirationNotificationService(FcmService fcmService, IngredientRepository
2626
this.ingredientRepository = ingredientRepository;
2727
}
2828

29-
@Scheduled(cron = "0 10 18 * * ?") // 매일 오전 9시에 실행
29+
@Scheduled(cron = "0 30 19 * * ?", zone = "Asia/Seoul")
30+
// 매일 오전 9시에 실행
3031
public void sendExpirationNotifications() {
32+
log.info("유통기한 알림 스케줄러 실행됨"); // 추가
33+
3134
LocalDate thresholdDate = LocalDate.now().plusDays(3); // 3일 이내로 남은 재료 조회
3235
List<Ingredient> expiringIngredients = ingredientRepository.findExpiringIngredients(thresholdDate);
3336

0 commit comments

Comments
 (0)