Skip to content

Spring Scheduler-read cron expression from bean [SPR-14170] #18742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Apr 14, 2016 · 1 comment
Closed
Assignees
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Apr 14, 2016

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:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Apr 14, 2016

Juergen Hoeller commented

This sounds like a duplicate of #18203.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants