boolean IPS_SetEventActive (int $EventID, boolean $Active)
EventID | ID of the event to be changed |
Active | Indicates whether the event should be activated (TRUE) or deactivated (FALSE) |
If the command succeeds, it returns TRUE, otherwise FALSE.
After the activation / deactivation, the new status can be read via IPS_GetEvent. It is possible to determine the next execution date for active cyclic events. For a deactivated event the NextRun value is zero.
IPS_SetEventActive($EventID, true); // Activates the event