date_expression
element may optionally contain a date_spec
or duration
element depending on the context.
Table 8.4. Attributes of a date_expression Element
Field | Description |
---|---|
id
| |
start
|
A date/time conforming to the ISO8601 specification. May be used when
operation is in_range (in which case at least one of start or end must be specified) or gt (in which case start is required).
|
end
|
A date/time conforming to the ISO8601 specification. May be used when
operation is in_range (in which case at least one of start or end must be specified) or lt (in which case end is required).
|
operation
|
Compares the current date/time with the start and/or end date, depending on the context. Allowed values:
|
Note
eq
, neq
, gte
, or lte
operation, since they would be valid only for a single second.
date_spec
element is used to create a cron-like expression relating to time. Each field can contain a single number or range. Any field not supplied is ignored.
Table 8.5. Attributes of a date_spec Element
Field | Description |
---|---|
id
| |
hours
| |
monthdays
| |
weekdays
| |
yeardays
| |
months
| |
weeks
| |
years
| |
weekyears
| |
moon
|
monthdays="1"
matches the first day of every month, and hours="09-17"
matches the hours between 9 a.m. and 5 p.m. (inclusive).
weekdays="1,2"
or weekdays="1-2,5-6"
) are not supported.
Note
date_expression
with an operation
of gt
, lt
, or in_range
will next change, and schedule a cluster re-check for that time. However, it does not do this for date_spec
. Instead, it evaluates the date_spec
whenever a cluster re-check naturally happens via a cluster event or the cluster-recheck-interval
cluster option. For example, if you have a date_spec
enabling a resource from 9 a.m. to 5 p.m., and cluster-recheck-interval
has been set to 5 minutes, then sometime between 9 a.m. and 9:05 a.m. the cluster would notice that it needs to start the resource, and sometime between 5 p.m. and 5:05 p.m. it would realize that it needs to stop the resource. The timing of the actual start and stop actions will further depend on factors such as any other actions the cluster may need to perform first, and the load of the machine.