# Cron Verifying expressions is not working

**URL:** <https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544>\
**Category:** Elasticsearch\
**Created:** [August 9, 2016, 3:18am UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544 "2016-08-09T03:18:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gupta.yuvraj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gupta.yuvraj/32/7550_2.png) [@gupta.yuvraj](https://discuss.elastic.co/u/gupta.yuvraj)\
**Post date:** [August 9, 2016, 3:18am UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544/1 "2016-08-09T03:18:10Z")

</div>

In X-Pack under Watcher we have schedule triggers which supports cron expressions.

Upon validating cron expression using the croneval {Present in $ES\_HOME/bin/x-pack} utility provided, it gives following error:-

Command used:-  
bin/x-pack/croneval "0 0/1 \* \* \* ?"

```auto
yuvraj@ubuntu:~/Downloads/ElasticStack5.0/Alpha4/elasticsearch-5.0.0-alpha4$ bin/x-pack/croneval "0 0/1 * * * ?"
Validates and evaluates a cron expression

Non-option arguments:
expression           

Option Description                    
------ -----------                    
-c, --count The number of future times this
                 expression will be triggered 
                 (default: 10)                
-h, --help show help                      
-s, --silent show minimal output            
-v, --verbose show verbose output            
ERROR: E is not a recognized option

```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 14, 2016, 7:29am UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544/2 "2016-10-14T07:29:33Z")

</div>

Hey,

this has been fixed with the rc1 release. Sorry for the delay!

--Alex

---

<div class="post-metadata">

**Author:** ![nick.e](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nick.e](https://discuss.elastic.co/u/nick.e)\
**Post date:** [May 17, 2017, 5:54am UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544/3 "2017-05-17T05:54:17Z")

</div>

Hey,

old post, but using elasticsearch 5.4.0 this error seems to occur again.  
Using command (from documentation) :

```
/usr/share/elasticsearch# bin/x-pack/croneval "0 0/1 * * * ?"
Validates and evaluates a cron expression

Non-option arguments:
expression

Option Description
------ -----------
-c, --count The number of future times this expression will be triggered
             (default: 10)
-h, --help show help
-s, --silent show minimal output
-v, --verbose show verbose output
ERROR: E is not a recognized option
/usr/share/elasticsearch#

```

Did it change again?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 17, 2017, 6:58am UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544/4 "2017-05-17T06:58:42Z")

</div>

Hey,

this works for me on a fresh installed `5.4.0` installation:

```auto
bin/x-pack/croneval "0 0/1 * * * ?"
Valid!
Now is [Wed, 17 May 2017 06:56:50]
Here are the next 10 times this cron expression will trigger:
1.	Wed, 17 May 2017 08:57:00
...

```

Is the plugin as well as the croneval script updated?

Can you share the output of

```auto
ls -l bin/x-pack/croneval

```

and

```auto
# sha1sum bin/x-pack/croneval
eba40f113a13e9e07d51eb18bdb1a51e8470536d bin/x-pack/croneval

```

Also, how did you install elasticsearch and x-pack?

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:39pm UTC](https://discuss.elastic.co/t/cron-verifying-expressions-is-not-working/57544/5 "2017-07-06T13:39:56Z")

</div>


