Skip to content

Watcher: croneval tool prints error on valid one time expression #32735

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

Closed
spinscale opened this issue Aug 9, 2018 · 1 comment
Closed

Watcher: croneval tool prints error on valid one time expression #32735

spinscale opened this issue Aug 9, 2018 · 1 comment

Comments

@spinscale
Copy link
Contributor

Using the croneval CLI tool, this spits an error to a perfectly valid one-time cron expression (tested on 6.3.2)

./bin/elasticsearch-croneval "0 3 23 8 9 ? 2019"
Valid!
Now is [Thu, 9 Aug 2018 07:54:34]
Here are the next 10 times this cron expression will trigger:
1.	Mon, 9 Sep 2019 01:03:00
ERROR: 2.	 Could not compute future times since [Mon, 9 Sep 2019 01:03:00] (perhaps the cron expression only points to times in the past?)

Instead of printing an error, we should just print the first line and exit and be good, as a one time cron expression is perfectly fine.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

lipsill added a commit to lipsill/elasticsearch that referenced this issue Aug 12, 2018
CronEvalTool prints an error only for cron expressions that result in
no coming time events.

If a cron expression results in less than the specified `-count`
(default 10) time events, the CronEvalTool prints all the coming
times and displays no error message.

Fixes elastic#32735
spinscale pushed a commit that referenced this issue Aug 23, 2018
CronEvalTool prints an error only for cron expressions that result in
no upcoming time events.

If a cron expression results in less than the specified count
(default 10) time events, now all the coming times are printed
without displaying error message.

Closes #32735
spinscale pushed a commit that referenced this issue Aug 23, 2018
CronEvalTool prints an error only for cron expressions that result in
no upcoming time events.

If a cron expression results in less than the specified count
(default 10) time events, now all the coming times are printed
without displaying error message.

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

No branches or pull requests

2 participants