My application loads some cron patterns from a properties file. I\'m using the @Scheduled annotation like this:
@Scheduled
@Scheduled(cron = "${config.
Per the Javadocs, as of Spring 5.1.0 the @Scheduled annotation can accept "-" as the cron expression to disable the cron trigger.
The special value "-" indicates a disabled cron trigger, primarily meant for externally specified values resolved by a ${...} placeholder.