jprante / elasticsearch-jdbc

JDBC importer for Elasticsearch
Apache License 2.0
2.84k stars 710 forks source link

Error on Cron Expression #583

Open fabioebner opened 9 years ago

fabioebner commented 9 years ago

I'm trying to use river 1.5.1 with cron expression:

"schedule" : "0 0 12,19 * * ?", //i need to run every 12:00 and 19:00 from all days , all months

but i got this error:

java.lang.IllegalArgumentException: invalid cron expression format: Unexpected end of expression. at org.xbib.elasticsearch.plugin.jdbc.cron.CronExpression.buildExpression(CronExpression.java:302)

github-arong commented 9 years ago

I also encountered this problem. My expression is : "schedule":"0 1,5 0-23 ? * ". ps: elasticsearch1.5.2 elasticsearch-river-jdbc-1.5.0.5 redhat 6+ and CentOS7 /**/ It's work well like this : "schedule":["0 1 0-23 ? * ","0 5 0-23 ? * ".] But too wordy. According to corn expression syntax, this is correct.But it throw exception.