OpenSearch/x-pack/docs/en/watcher/trigger/schedule/hourly.asciidoc

51 lines
1.5 KiB
Plaintext
Raw Normal View History

[role="xpack"]
[[schedule-hourly]]
==== Hourly schedule
A <<trigger-schedule,`schedule`>> that triggers at a particular minute every
hour of the day. To use the `hourly` schedule, you specify the minute (or minutes)
when you want the scheduler to start the watch execution with the `minute`
attribute.
NOTE: If you don't specify the `minute` attribute for an `hourly` schedule, it
defaults to `0` and the schedule triggers on the hour every hour--`12:00`,
`13:00`, `14:00`, and so on.
===== Configuring a once an hour schedule
To configure a once an hour schedule, you specify a single time with the `minute`
attribute.
For example, the following `hourly` schedule triggers at minute 30 every hour--
`12:30`, `13:30`, `14:30`, ...:
[source,js]
--------------------------------------------------
{
"trigger" : {
"schedule" : {
"hourly" : { "minute" : 30 }
}
}
}
--------------------------------------------------
// NOTCONSOLE
===== Configuring a multiple times hourly schedule
To configure an `hourly` schedule that triggers at multiple times during the
hour, you specify an array of minutes. For example, the following schedule
triggers every 15 minutes every hour--`12:00`, `12:15`, `12:30`, `12:45`,
`1:00`, `1:15`, ...:
[source,js]
--------------------------------------------------
{
"trigger" : {
"schedule" : {
"hourly" : { "minute" : [ 0, 15, 30, 45 ] }
}
}
}
--------------------------------------------------
// NOTCONSOLE