Name

trigger sleep, triggersleep, kPMTriggerTriggerSleep — Trigger when the computer is about to sleep.

Synopsis

trigger sleep structure { type };
type : string, choice

Description

Trigger when the computer is about to sleep.

The trigger will fire when the operating system notifies processes that sleep is about to occur. This notification is an opportunity for hardware to idle and software to pause nicely.

Avoid starting long running processes or tasks. Any process that lasts more than a second or two, may interrupt sleep or be interrupted by the sleep process.

You should avoid using the sleep trigger.

Fields

type. Type of trigger being described.

type is a string. type must be sleep, kPMTriggerType_Sleep.