I\'m trying to have my code execute on a fixed schedule, based on a Spring cron expression. I would like the code to be executed every day at 1:01:am. I tried the following
Something missing from gipinani's answer
@Scheduled(cron = "0 1 1,13 * * ?", zone = "CST")
This will execute at 1.01 and 13.01. It can be used when you need to run the job without a pattern multiple times a day.
And the zone attribute is very useful, when you do deployments in remote servers. This was introduced with spring 4.