Reputation: 91
I am trying to read cron expression from application.yml in spring boot,but i am getting below error
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning an alias in 'reader', line 32, column 16: batchfreq: */5 * * * * expected alphabetic or numeric character, but found /
in application yml batchfreq: */5 * * * *
@Scheduled(cron="${services.dmt.batchfreq}")
public void update(){}
Upvotes: 1
Views: 2786
Reputation: 91
I resolved above error by changing cron expresssion from */5 * * * * to "*/5 * * * *",the issue may be due to space in between value.
Upvotes: 6