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

49 lines
1.4 KiB
Plaintext

[[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 }
}
}
}
--------------------------------------------------
===== 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 ] }
}
}
}
--------------------------------------------------