I am trying to run this job in spring but i am getting an error
My intention is to run the job last Friday of every month
@EnableScheduling
@Service
public class TestSchedular {
@Scheduled(cron= "0 0 0 ? * 6L")
public void schedular() {
System.out.println("Cron Job");
}
Error:
Caused by: java.lang.IllegalStateException: Encountered invalid @Scheduled method 'schedular': For input string: "6L"
What is wrong with this code?