2019-09-10 13:32:51 -04:00
|
|
|
[role="xpack"]
|
2017-03-28 17:23:01 -04:00
|
|
|
[[schedule-hourly]]
|
2019-09-30 13:18:50 -04:00
|
|
|
==== Hourly schedule
|
2017-03-28 17:23:01 -04:00
|
|
|
|
2019-09-30 13:18:50 -04:00
|
|
|
A <<trigger-schedule,`schedule`>> that triggers at a particular minute every
|
2017-03-28 17:23:01 -04:00
|
|
|
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.
|
|
|
|
|
2019-09-30 13:18:50 -04:00
|
|
|
===== Configuring a once an hour schedule
|
2017-03-28 17:23:01 -04:00
|
|
|
|
|
|
|
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 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
2018-06-22 21:09:37 -04:00
|
|
|
// NOTCONSOLE
|
2017-03-28 17:23:01 -04:00
|
|
|
|
2019-09-30 13:18:50 -04:00
|
|
|
===== Configuring a multiple times hourly schedule
|
2017-03-28 17:23:01 -04:00
|
|
|
|
|
|
|
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 ] }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
2018-06-22 21:09:37 -04:00
|
|
|
// NOTCONSOLE
|