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

Comma no longer works in schedule (cron syntax) #299

Open
MichaelXt opened this issue Jul 29, 2014 · 7 comments
Open

Comma no longer works in schedule (cron syntax) #299

MichaelXt opened this issue Jul 29, 2014 · 7 comments

Comments

@MichaelXt
Copy link

Comma no longer works in schedule (cron syntax).

java.lang.IllegalArgumentException: invalid cron expression format: Unexpected end of expression
at org.xbib.cron.CronExpression.buildExpression(CronExpression.java:287)
at org.xbib.cron.CronExpression.(CronExpression.java:101)
at org.xbib.elasticsearch.plugin.feeder.AbstractFeeder.schedule(AbstractFeeder.java:177)
at org.xbib.elasticsearch.plugin.river.jdbc.JDBCRiver.start(JDBCRiver.java:94)
at org.elasticsearch.river.RiversService.createRiver(RiversService.java:148)

@jprante
Copy link
Owner

jprante commented Jul 29, 2014

Can you show the cron expression you use?

@MichaelXt
Copy link
Author

Sure: "0 5,35 * * * ?" gives the error, but the "0 35 * * * ?" works fine

@jprante
Copy link
Owner

jprante commented Jul 31, 2014

I have added a "comma test" in JDBC river 1.3.0.1 with your expression, it works fine.

@iamgururaj
Copy link

I had the same issue. As a workaround I had used an array of cron expression as the schedule params support this.
Example:
"schedule": ["0 0 3 ? * *","0 0 7 ? * *","0 0 11 ? * *"]

@jprante
Copy link
Owner

jprante commented Oct 19, 2014

Is the comma issue on Windows?

@iamgururaj
Copy link

@jprante no. Its occuring in linux as well. sorry for the delayed response

@loganbhardy
Copy link

Just confirming that I'm seeing the same issue with the latest elasticsearch-river-jdbc-1.4.0.8

"schedule": "0 1,16,31,46 * * * ? *",
throws the error
"schedule": "0 1/15 * * * ? *",
works fine

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

4 participants