Hi,
I tried using @scheduled(cron = "${config.Time}") on the method which should execute at some time.I have defined the cron expression in the properties file as config.time="0 0 1 * * *".
But I see this exception ,am I missing something here.
20:56:48,418 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-13) Context initialization failed: java.lang.NumberFormatException: For input string: ""0"
at java.lang.NumberFormatException.forInputString(Num berFormatException.java:65) [rt.jar:1.7.0_03]
at java.lang.Integer.parseInt(Integer.java:481) [rt.jar:1.7.0_03]
at java.lang.Integer.valueOf(Integer.java:582) [rt.jar:1.7.0_03]
at org.springframework.scheduling.support.CronSequenc eGenerator.getRange(CronSequenceGenerator.java:324 ) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
Please help.
Thanks


Reply With Quote