I am facing a problem with cron expression. I have to ran a method from Thursday to Sunday by every 30 minutes. It time will start from 20:35 min till 23:35 min.
Cron expression:
"0 35/30 20-23 ? * THU-SUN";
As per my understanding; My method will invoke at 20:35 min at Thursday by every 30 minutes till Sunday.
My Expectation:
Method will invoke as per below timings:
Thu May 19 20:35:00 IST 2016
Thu May 19 21:05:00 IST 2016
Thu May 19 21:40:00 IST 2016
But; Method get invokes by below timings:
Thu May 19 20:35:00 IST 2016
Thu May 19 21:35:00 IST 2016
Thu May 19 22:35:00 IST 2016
Can anyone help me out. Why cron expression evaluating by every 1 hour.??
Here is code example:
@Scheduled(cron="0 35/30 20-23 ? * THU-SUN")
public void startInboundSFTPChannel(){
logger.info("Cron job started....");
downloadSftpFilesController();
}