I have a cron expression set in the application properties file as follows:
report.monthlyScheduleTime=0 10 07 1W * ?
and annotated like the following,
@Scheduled(cron = "${report.monthlyScheduleTime}", zone="${report.scheduleTimeZone}")
But when ran the application, I got the following exception.
Caused by: java.lang.IllegalStateException: Encountered invalid @Scheduled method 'ReportJob': For input string: "1W".
Spring Boot seems to not accept 1W
defined in the cron expression. Any idea why?