« Back to Product



Require: IP-Symcon >= 5.2

 boolean IPS_SetEventConditionDayOfTheWeekRule (int $EventID, int $ConditionID, int $RuleID, int $Comparison, int $Weekday) 



ID of the event to be changed


ID of the condition that contains the rule


Unique ID for this group. IDs need to be unique for this condition only.

Value Description
0 ==
1 !=
2 >
3 >=
4 <
5 <=
Value Description
0 Delete
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday


If the command succeeds, it returns TRUE, otherwise FALSE.


This function modifies the rule with the ID RuleID of the condition with the ID ConditionID of the event with the ID EventID. The rule compares the current day of the week with the day of the week, according to the comparison operation Comparison. If there is no rule with the ID RuleID, one will be created.

If the value Weekday is 0, the rule with the ID RuleID will be deleted.


Which rule ID contains which rule can be looked up via IPS_GetEvent.


//Add an AND condition
IPS_SetEventCondition(12345, 0, 0, 0)

// Adds / modifies the rule with the ID 2 for the event with the object ID 12345
// It is greater than or equal to Thursday i.e.: Thursday to Sunday included
IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 2, 3, 4);

// Adds / modifies the rule with the ID 3 for the event with the object ID 12345
// It is unequal to Sunday
IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 3, 1, 7);

// Delete the rule with ID 2
IPS_SetEventConditionDayOfTheWeekRule(12345, 0, 2, 0, 0);
Any questions?