I wanted to run a spring scheduler job at 'last day of every month at 10:15' and 'First Sunday of every month' -
I have tried below - but it is giving error while initializing spring context:
org.springframework.boot.SpringApplication:Application startup failed java.lang.IllegalStateException: Encountered invalid @Scheduled method 'monthEndSchedule': For input string: "L"
@Override
@Scheduled(cron = "0 15 10 L * ?")
public void monthEndSchedule() {
//
}
Though below works which runs at 'every day 1 am'
@Override
@Scheduled(cron = "0 0 1 * * ?")
public void surveyDailySchedule() {
//
}
Cron expression reference I have used : http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html