Is there a way to call a getter (or even a variable) from a propertyClass in Spring\'s @Scheduled cron configuration? The following doesn\'t compil
@Scheduled
cron
@Component public class MyReminder { @Autowired private SomeService someService; @Scheduled(cron = "${my.cron.expression}") public void excecute(){ someService.someMethod(); } }
in /src/main/resources/application.properties
my.cron.expression = 0 30 9 * * ?