Closed
Description
Arijeet Saha opened SPR-14170 and commented
The below code doesnot work as cron is not able to read from spring bean.
@Bean
String expression(){
return config.get(RUN_SANITY_CRON_EXPRESSION);
}
@Scheduled
(cron = "#{expression}")
public void work(){
LOGGER.debug("Executing --------------->");
}
Does Spring @Scheduled
support this?
Issue Links:
- Support SpEL next to placeholders in annotation attributes (e.g. @Scheduled) [SPR-13625] #18203 Support SpEL next to placeholders in annotation attributes (e.g.
@Scheduled
) ("duplicates")