Monthly
There are two methods to configure the Monthly Calendar Trigger.
First Method:
The first method will configure the specific day or days of a month that the event will be triggered. To do this, follow the steps below:
1. In the Type ComboBox field, select the value Calendar.
2. In the Action Type ComboBox field, select the desired type (Execute an Expression or a Service).
3. Select the Monthly RadioButton Field.
4. In the DateTime TextBox field, insert the Date and Time that the trigger will be activated.
5. Select the desired Months that the trigger will be activated.
6. Select the RadioButton Days.
7. Select the day(s) of the
Month that the event will be triggered.
Example 1: Triggering on a specific day.
We will make a Trigger which activates every May 30 .
. Create a tag in Tags Document named CalendarTag (integer).
. Next, create a new Trigger document and name it TriggerDoc, and then insert a new item.
. In the item configuration, keep the Trigger Type as Calendar, in the Action Type select the value Expression.
. Select the Monthly radio-button and configure the DateTime to activate the Trigger.
. Select the month or months you want to activate the Trigger; in this case May.
. Select the RadioButton Days.
. Select the specific day or days the Trigger will activate; in this case 30.
.
In Expression, write: @CalendarTag++;
. At this point, we will create a new Graphics Document named as TriggerTest.
. In this document create a new TextBox object.
. After creating the object, set the field Text with the following configuration: @CalendarTag
. Save the modifications and set the TriggerTest document to be the Startup Document.
. Execute the RunTime.
. Now, every May 30, @CalendarTag will have its value increased by one.
Second Method:
The second method will configure what week and what day of the week the event will be triggered. To configure, follow the steps below:
1. In the Type ComboBox field, select the value Calendar.
2. In the Action Type ComboBox field, select the desired type (Execute an Expression or a Service).
3. Select the Monthly Radio-Button Field and configure the DateTime to activate the Trigger.
4. Select the Radio-Button On.
5. Select which week the Trigger will be triggered (ex, first week of the month, second week of the month and so on).
6. Select the day(s) of the week that the event will be triggered.
Example 2: Using Triggering on an unspecified day.
We will make a Trigger which activates on the second Monday of June every year.
. Create a tag in Tags Document named CalendarTag (integer).
. Next, create a Trigger document and name it TriggerDoc, and then insert a new item.
. In the item configuration, keep the Trigger Type as Calendar, in the Action Type select the value Expression.
. Select the Monthly radio-button and configure the DateTime that the trigger will be triggered.
. Select the On RadioButton.
. Select the CheckBox Second, and then Monday.
.
In the Expression field insert: @CalendarTag ++;
. At this point, we will create a new Graphics Document named TriggerTest.
. In this document create a new TextBox object.
. After creating the object, set the field Text with the following configuration:
@CalendarTag
. Save the modifications and set the TriggerTest document to be the Startup Graphic.
. Execute the RunTime.
. Now, every second Monday of June @CalendarTag will increment.
|
Note: In the second method, if a month has only four weeks, both CheckBoxes "Last" and "Forth" will trigger the event. But when a month has five weeks, the "Last" Check-Box will correspond to the fifth week. |