diff --git a/src/main/java/com/onestep/server/service/question/GptService.java b/src/main/java/com/onestep/server/service/question/GptService.java index 7308019..267fe25 100644 --- a/src/main/java/com/onestep/server/service/question/GptService.java +++ b/src/main/java/com/onestep/server/service/question/GptService.java @@ -48,11 +48,11 @@ private HttpEntity getHttpEntity(ChatRequestDTO chatRequest) { public String getKeyword(){ Random random = new Random(); random.setSeed(System.currentTimeMillis()); - Long randomNum = (long) (random.nextInt(70) + 1); + Long randomNum = (long) (random.nextInt(99) + 1); Optional optionalKeyWord = iKeyWordRepository.findById(randomNum); return optionalKeyWord.get().getKeyword(); } - @Scheduled(cron = "0 0 6 ? * TUE,THU,FRI,SUN", zone = "Asia/Seoul") //화 목 금 일 + @Scheduled(cron = "0 0 0 ? * TUE,THU,FRI,SUN", zone = "Asia/Seoul") //화 목 금 일 public void getGroupQuestions() { Date date = new Date(); @@ -144,7 +144,7 @@ public void getGroupQuestions() { iGroupQuestionRepository.saveAll(newQuestionList); } - @Scheduled(cron = "0 0 6 ? * MON,WED,SAT", zone = "Asia/Seoul") //월, 수, 토 + @Scheduled(cron = "0 0 0 ? * MON,WED,SAT", zone = "Asia/Seoul") //월, 수, 토 public void getQuestions() { Date date = new Date();