DateTime
允许您编写仅在指定时间触发的规则。
属性 |
类型 |
说明 |
示例 |
|---|---|---|---|
DayOfWeek |
整型 |
仅在一周中的某些日子触发规则 |
可能的值为: •0—Sunday •1—Monday •2—Tuesday •3—Wednesday •4—Thursday •5—Friday •6—Saturday |
Hour |
整型 |
仅在一天中的某些时间触发规则。可能的值为 0 至 23 |
12 |
Minute |
整型 |
仅在一天中的某些时间触发规则。 可能的值为 0 至 59 |
30 |
示例
每次在周一至周五上午 9 点至下午 5 点之间打开记事本时,都会触发此规则。
<definition> <process> <operator type="and"> <condition component="FileItem" property="FileNameWithoutExtension" condition="is" value="Notepad" /> <condition component="DateTime" property="Hour" condition="greaterOrEqual" value="9" /> <condition component="DateTime" property="Hour" condition="lessOrEqual" value="17" /> <condition component="DateTime" property="DayOfWeek" condition="greaterOrEqual" value="1" /> <condition component="DateTime" property="DayOfWeek" condition="lessOrEqual" value="5" /> </operator> </process> </definition> |
支持的行动
所有操作都支持 DateTime 组件。