cancel, scheduler.cancel, kPMRPCSchedulerCancel — Cancel a pending queued trigger.
trigger ID : string, length 1..255;
until : date, optional;
Cancel a pending queued trigger.
cancel cancels a pending queued trigger. Cancelling a queued trigger affects an instance of a trigger, not the trigger. If the date and time trigger can repeat, that is it calculates a relative date such as once-a-day, the next trigger date will be calculated and a new queued triggered will shortly appear in pending.
If the trigger repeats, providing an until date offers the ability to cancel more than one trigger instance. If no until parameter is provided, only the next instance of the trigger is cancelled.
To cancel a trigger for three days, you can provide cancel with an until date three days in the future, or you can call cancel on the appropriate queued trigger ID three times; note the queued trigger ID changes after each adjust, cancel, or reset request.
If the provided trigger ID does not match an existing queued trigger ID, no change occurs.
trigger ID. Trigger ID of a queued trigger.
trigger ID is a string.
trigger ID must be between
255 characters long, inclusive.
until. Date before which the trigger can not trigger the event.
until is a date.
until is optional.
cancel can be requested by any authenticated client.
Unauthenticated clients are authorized using the
uk.co.dssw.powermanager.scheduler.cancel right. By default, only local processes belonging to
administrator can send a
Example 124. C: Minimal scheduler.cancel
CFStringRef myTriggerID = NULL; CFDateRef myUntil = NULL; ... CFMutableDictionaryRef myRequest = PMRequestCreateWithParameters(kCFAllocatorDefault, kPMRPCSchedulerCancel, kPMRPCParameterTriggerID, myTriggerID, kPMRPCParameterUntil, myUntil, nil);