-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Mark Fisher opened SPR-6670 and commented
This would promote externalization of the actual scheduling configuration.
Rather than:
@Scheduled(cron = "0 0 9-17 * * MON-FRI")
public void doSomething() {...}
The cron expression could be in a properties file, so the annotation no longer contains a hard-coded value:
@Scheduled("${schedules.businessHours}")
public void doSomething() {...}
This should also work with meta-annotations, e.g.:
@Scheduled(cron = "${schedules.businessHours}")
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface BusinessHours {}
...would apply to:
@BusinessHours
public void doSomething() {...}
Affects: 3.0 GA
Issue Links:
- @Scheduled's int attributes do not allow for placeholder values [SPR-8067] #12722
@Scheduled
's int attributes do not allow for placeholder values
Referenced from: commits 410dd0a
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement