Name

trigger after inactivity, triggerafterinactivity, kPMTriggerTriggerAfterInactivity — Trigger after a given period of user inactivity.

Synopsis

trigger after inactivity structure { type, seconds of inactivity, trigger limit };
type : string, choice
seconds of inactivity : integer, default, range 1..86400
trigger limit : integer, default, optional, range 0..86400

Description

Trigger after a given period of user inactivity.

Activity is a measure of user activity and not computer, process, or device activity. Inactivity is a measure of time since the user last interacted with an input device.

This is not idle time but rather a more specific metric. If the mouse, keyboard, or other input device is in use, the user is not inactive.

Fields

type. Type of trigger being described.

type is a string. type must be inactive, kPMTriggerType_Inactive.

seconds of inactivity. Period of inactivity needed before triggering.

seconds of inactivity is measured in seconds.

seconds of inactivity is an integer. If seconds of inactivity is omitted, the default 900 is used. seconds of inactivity must be between 1 and 86400, inclusive.

trigger limit. Limit the frequency of repeating triggers.

An inactivity trigger will fire whenever the inactivity timer is greater than the required seconds of inactivity field. If the event's conditions postpone the event's performance, the inactivity trigger is rescheduled and would to fire again immediately. The trigger limit provides a minimum number of seconds between inactivity triggers. Each trigger limit is applied per trigger instance.

If the inactivity trigger has a value of 15 minutes, and a trigger limit value of 5 minutes, the event will triggered once after 15 minutes of inactivity and then every 5 minutes until activity occurs.

If the trigger's event is removed and added, or reset, the trigger limit's behaviour is reset.

If activity occurs, the trigger's trigger limit behaviour is reset. If the inactivity trigger has a value of 15 minutes, and a trigger limit value of 30 minutes, the event will triggered once after 15 minutes of inactivity and then every 30 minutes. When activity occurs, the trigger limit will reset and the trigger will next fire after 15 minutes.

The trigger limit is optional. If a value is not provided, the seconds of inactivity field is used instead. This behaviour provides the most commonly expected outcome.

If a value of zero seconds is set, the inactivity trigger will not repeat until the inactivity timer has been reset.

trigger limit is an integer. If trigger limit is omitted, the default 900 is used. trigger limit is optional. trigger limit must be between 0 and 86400, inclusive.