My application loads some cron templates from a properties file. Im using annotation @Scheduledas follows:
@Scheduled(cron = "${config.cronExpression:0 0 11,23 * * *}")
Now I want to disable some tasks, and the easiest solution would be to introduce a cron template that will never work. To do this, I thought about using a cron expression that only runs on a specific day in the past. But unfortunately, Spring cron expressions do not allow adding a year or date in the past.
Is there any pattern that will never work?
source
share