@Scheduled (1) 썸네일형 리스트형 Spring @Scheduled cron 표현식은 년도를 설정할 수 없다 (Cron expression must consist of 6 fields (found 7 in "cron expression...")) 문제 목표: 이벤트 당첨자에게 올해 3~12월 10달 동안 매월 쿠폰을 발급해야 한다. 그래서 쿠폰 발급 프로세스를 Batch 프로젝트에 추가하고 크론은 다음과 같이 설정하였다. // 2021년 3~12월 매달 1일 새벽 1시 30분 실행 @Scheduled(cron = "0 30 3 1 3-12 ? 2021") 그런데 배치 프로젝트 실행 시 이런 오류가 발생했다. Cron expression must consist of 6 fields (found 7 in "0 30 3 1 3-12 ? 2021")원인 Spring @Scheduled 크론은 6자리 설정만 허용한다.(연도 설정 불가) 참고 링크: https://docs.spring.io/spring-framework/docs/current/javadoc.. 이전 1 다음