Skip to content

Commit c9909b0

Browse files
committed
[DOCS] Adds command reference for elasticsearch-croneval (#43946)
1 parent acb7f59 commit c9909b0

File tree

3 files changed

+64
-16
lines changed

3 files changed

+64
-16
lines changed
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[role="xpack"]
2+
[testenv="gold+"]
3+
[[elasticsearch-croneval]]
4+
== elasticsearch-croneval
5+
6+
Validates and evaluates a cron expression.
7+
8+
[discrete]
9+
=== Synopsis
10+
11+
[source,shell]
12+
--------------------------------------------------
13+
bin/elasticsearch-croneval <expression>
14+
[-c, --count <integer>] [-h, --help]
15+
([-s, --silent] | [-v, --verbose])
16+
--------------------------------------------------
17+
18+
[discrete]
19+
=== Description
20+
21+
This command enables you to verify that your
22+
https://en.wikipedia.org/wiki/Cron[cron] expressions are valid for use with the
23+
{es} {alert-features} and produce the expected results.
24+
25+
This command is provided in the `$ES_HOME/bin` directory.
26+
27+
[discrete]
28+
=== Parameters
29+
30+
`-c, --count` <Integer>::
31+
The number of future times this expression will be triggered. The default
32+
value is `10`.
33+
34+
`-h, --help`::
35+
Returns all of the command parameters.
36+
37+
`-s, --silent`::
38+
Shows minimal output.
39+
40+
`-v, --verbose`::
41+
Shows verbose output.
42+
43+
[discrete]
44+
=== Examples
45+
46+
If the cron expression is valid, the following command displays the next
47+
20 times that the schedule will be triggered:
48+
49+
[source,bash]
50+
--------------------------------------------------
51+
bin/elasticsearch-croneval "0 0/1 * * * ?" -c 20
52+
--------------------------------------------------

docs/reference/commands/index.asciidoc

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tasks from the command line:
99

1010
* <<certgen>>
1111
* <<certutil>>
12+
* <<elasticsearch-croneval>>
1213
* <<migrate-tool>>
1314
* <<node-tool>>
1415
* <<saml-metadata>>
@@ -21,6 +22,7 @@ tasks from the command line:
2122

2223
include::certgen.asciidoc[]
2324
include::certutil.asciidoc[]
25+
include::croneval.asciidoc[]
2426
include::migrate-tool.asciidoc[]
2527
include::node-tool.asciidoc[]
2628
include::saml-metadata.asciidoc[]

x-pack/docs/en/watcher/trigger/schedule/cron.asciidoc

+10-16
Original file line numberDiff line numberDiff line change
@@ -211,27 +211,21 @@ minute during the weekend:
211211
// NOTCONSOLE
212212

213213
[[croneval]]
214-
===== Verifying Cron Expressions
214+
===== Verifying cron expressions
215215

216-
The {es} {alert-features} provide a `elasticsearch-croneval` command line tool
217-
that you can use to verify that
218-
your cron expressions are valid and produce the expected results. This tool is
219-
provided in the `$ES_HOME/bin` directory.
216+
The {es} {alert-features} provide a
217+
{ref}/elasticsearch-croneval.html[`elasticsearch-croneval`] command line tool
218+
that you can use to verify that your cron expressions are valid and produce the
219+
expected results. This tool is provided in the `$ES_HOME/bin` directory.
220220

221-
To verify a cron expression, simply pass it in as a parameter to `elasticsearch-croneval`:
221+
To verify a cron expression, simply pass it in as a parameter to
222+
`elasticsearch-croneval`:
222223

223224
[source,bash]
224225
--------------------------------------------------
225226
bin/elasticsearch-croneval "0 0/1 * * * ?"
226227
--------------------------------------------------
227228

228-
If the cron expression is valid, `elasticsearch-croneval` displays the next 10 times that the
229-
schedule will be triggered.
230-
231-
You can specify the `-c` option to control how many future trigger times are
232-
displayed. For example, the following command displays the next 20 trigger times:
233-
234-
[source,bash]
235-
--------------------------------------------------
236-
bin/elasticsearch-croneval "0 0/1 * * * ?" -c 20
237-
--------------------------------------------------
229+
If the cron expression is valid, `elasticsearch-croneval` displays the next 10
230+
times that the schedule will be triggered. You can specify the `-c` option to
231+
control how many future trigger times are displayed.

0 commit comments

Comments
 (0)