Skip to content
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

Default for scheduler.rate does not follow the cron syntax #16

Closed
hkkenneth opened this issue Mar 21, 2017 · 2 comments
Closed

Default for scheduler.rate does not follow the cron syntax #16

hkkenneth opened this issue Mar 21, 2017 · 2 comments

Comments

@hkkenneth
Copy link
Collaborator

@Scheduled(cron = "${scheduler.rate:30000}")

@Scheduled can take one of cron(), fixedDelay(), or fixedRate() , but the default does not follow the cron syntax

Note that the cron syntax in spring (with precision up to seconds) is different from normal ones.
Spring: http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/annotation/Scheduled.html#fixedDelay--
Normal: http://www.nncron.ru/help/EN/working/cron-format.htm

@hkkenneth
Copy link
Collaborator Author

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduledJobLauncher': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Encountered invalid @Scheduled method 'doTask': Cron expression must consist of 6 fields (found 1 in "30000")

@afolarin
Copy link
Member

This issue was moved to CogStack/CogStack-Pipeline#25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants