Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.time.LocalDate;

@Slf4j
@CronJob(cron = "0 0 6 20 10 ?", name = "examNumberGeneratorJob_20251026")
@CronJob(cron = "0 0 3 22 10 ?", name = "examNumberGeneratorJob_20251026")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Cron 표현식이 "0 0 3 22 10 ?"와 같이 하드코딩되어 있어 가독성이 떨어지고 유지보수가 어렵습니다. 이 표현식이 어떤 시간을 의미하는지 명확하게 알 수 있도록 주석을 추가하는 것을 권장합니다.

또한, 이 Cron 실행 시간(10월 22일 03시)은 잡 이름의 날짜(20251026) 및 execute 메소드 내부의 examDate (2025-10-26)와 논리적으로 연결되어 있습니다. 이 값들이 여러 곳에 하드코딩되어 있어, 향후 날짜 변경 시 일부만 수정하여 버그가 발생할 위험이 있습니다. 관련 값들을 상수로 정의하여 관리하는 것을 고려해보시는 것이 좋겠습니다.

Suggested change
@CronJob(cron = "0 0 3 22 10 ?", name = "examNumberGeneratorJob_20251026")
// 2025년 10월 22일 오전 3시에 실행
@CronJob(cron = "0 0 3 22 10 ?", name = "examNumberGeneratorJob_20251026")

@DisallowConcurrentExecution
@RequiredArgsConstructor
public class ExamNumberGenerationJobRound2 implements Job {
Expand Down
Loading