33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
[[condition-always]]
|
|
==== Always Condition
|
|
|
|
A watch <<condition, condition>> that always evaluates to `true`. When you use the `always`
|
|
condition, the watch's actions are always executed when the watch is triggered, unless the action
|
|
is <<actions-ack-throttle, throttled>>.
|
|
|
|
NOTE: If you omit the condition definition from a watch, the condition defaults to `always`.
|
|
|
|
You can use the `always` condition to configure watches that should run on a set schedule, such as:
|
|
|
|
[source,text]
|
|
--------------------------------------------------
|
|
"At noon every Friday, send a status report email to sys.admin@example.com"
|
|
--------------------------------------------------
|
|
|
|
To configure this watch, you define an input that loads the status data, set a schedule that
|
|
triggers every Friday, set the condition to `always`, and configure an email action to send the
|
|
status data.
|
|
|
|
===== Using the Always Condition
|
|
|
|
There are no attributes to specify for the `always` condition. To use the `always` condition,
|
|
you simply specify the condition type and associate it with an empty object:
|
|
|
|
[source,json]
|
|
--------------------------------------------------
|
|
"condition" : {
|
|
"always" : {}
|
|
}
|
|
--------------------------------------------------
|
|
|