Show Table of Contents
9.6. 基于时间的表达式示例
如果现在是 2005 年的任何一天,则以下命令会配置一个值为 true 的表达式。
# pcs constraint location Webserver rule score=INFINITY date-spec years=2005
以下命令配置一个在周一到周五, 9pm 到 5am 间值为 true 的表达式。注:小时值 16 最大可匹配为 16:59:59,因为(小时)数仍匹配。
# pcs constraint location Webserver rule score=INFINITY date-spec hours="9-16" weekdays="1-5"
以下命令配置一个 13 号,周五,满月时值为 true 的表达式。
# pcs constraint location Webserver rule date-spec weekdays=5 monthdays=13 moon=4
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.