The Daily Period Timer Condition is triggered at a specific hour of the day and stays triggered for a certain period of time.
Overview
All timer conditions except Daily Period Timer conditions are valid only at a specific point in time. If that point is missed (for example if the system is not running, or the rule that links the condition to a command is still not defined), the condition will not be triggered. Period conditions address this problem by letting you define a period, for which the condition is satisfied (for example, one minute, one hour etc.). Every time when the system starts or when a new rule is created, the HAM module checks if there are Daily Period Timer conditions which are satisfied and if there are, it triggers them.
Managing Period Timer Conditions
Via Java API
After creating a condition as described in Managing Conditions you can configure it by using the following methods:
After you configure your condition, call the save method. The Condition Provider will save the condition in Config Tree
Via ConfigTree
All conditions are stored in the Config Tree, which allows you to import/export them and to add/edit them by simply creating and modifying XML files.
The following example contains a daily period condition which becomes active at Mon Nov 28 2011 16:00:00 GMT+0200 (specified as 1322488800000 milliseconds to the startTime property) and is active every day from 8:00 to 16:00.
<config name="DailyPeriodCondition">
<config name="DailyPeriodCondition1">
<property key="minute" value="0" type="int"/>
<property key="startTime" value="1360567988000" type="long"/>
<property key="periodEndMinute" value="0" type="int"/>
<property key="seconds" value="0" type="int"/>
<property key="periodEndSeconds" value="0" type="int"/>
<property key="hour" value="8" type="int"/>
<property key="periodEndHour" value="16" type="int"/>
<config name="days">
<property key="3" value="true" type="boolean"/>
<property key="2" value="true" type="boolean"/>
<property key="1" value="true" type="boolean"/>
<property key="0" value="true" type="boolean"/>
<property key="6" value="true" type="boolean"/>
<property key="5" value="true" type="boolean"/>
<property key="4" value="true" type="boolean"/>
</config>
</config>
</config>