Loading...

Evaluating Elasticsearch Watcher Cron Expression

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Working with Elasticsearch Watcher enables you to put a cron schedule into the trigger. This is no ordinary linux cron expression. It looks like Quartz. If you want to test the correctness of the cron, you use the shipped utility croneval in the installed X-Pack directory.

tknga@omega:/opt/elasticsearch-5.4.3/bin/x-pack> ./croneval "0 */5 5-21 * * ?"
Valid!
Now is [Fri, 7 Jul 2017 11:41:35]
Here are the next 10 times this cron expression will trigger:
1.      Fri, 7 Jul 2017 11:45:00
2.      Fri, 7 Jul 2017 11:50:00
3.      Fri, 7 Jul 2017 11:55:00
4.      Fri, 7 Jul 2017 12:00:00
5.      Fri, 7 Jul 2017 12:05:00
6.      Fri, 7 Jul 2017 12:10:00
7.      Fri, 7 Jul 2017 12:15:00
8.      Fri, 7 Jul 2017 12:20:00
9.      Fri, 7 Jul 2017 12:25:00
10.     Fri, 7 Jul 2017 12:30:00
Please remember the terms for blog comments.