ScheduledTrigger

TimeTriggerModule. ScheduledTrigger

new ScheduledTrigger(config)

Description:
  • Trigger for scheduled events.

Source:
Parameters:
Name Type Description
config object

Configuration data

Properties
Name Type Attributes Description
identifier string <optional>

Identifier

days module:TriggerTypes.TRIGGER_DAYS <optional>

Bitmask of days of the week to schedule the trigger.

astronomical_type ASTRONOMICAL_TRIGGERS <optional>

Type of astronomical trigger. Not used if not astronomical.

time object

Structure of time to trip the trigger

Properties
Name Type Attributes Description
astronomical_offset object <optional>

Offset from the astronomical event. Not used if not astronomical.

astronomical_offset.type TIME_OFFSET_TYPES

Type of offset.

time.astronomical_offset.hour number

Hour (0-23)

time.astronomical_offset.minute number

Minute (0-59)

time.nominal object <optional>

Nominal time to trip the trigger. Not used if astronomical.

Properties
Name Type Description
hour number

Hour (0-23)

minute number

Minute (0-59)

time.tolerance object

Tolerance around the nominal time to trip the trigger.

Properties
Name Type Description
hour number

Hour (0-23)

minute number

Minute (0-59)

duration object <optional>

Range of times for the tripped duration.

Properties
Name Type Description
nominal number

Minimum time, in milliseconds for the tripped duration.

tolerance number

Maximum time, in milliseconds for the tripped duration.

location object <optional>

Location used when trigger is astronomical. ** Required for Astronomical Triggers.

Properties
Name Type Description
latitude number

Latitude

longitude number

Longitude

Throws:
    • Thrown if 'config' is invalid.
    Type
    TypeError
    • Thrown if 'config' is invalid.
    Type
    RangeError
    • Thrown if 'config.location' is invalid.
    Type
    Error

Extends

  • TimeTrigger

Methods

EnterArming() → {boolean}

Description:
  • Enter Arming State

Source:
Returns:

Always return true.

Type
boolean

EnterIdle() → {boolean}

Description:
  • Enter Idle State

Source:
Returns:

Always return true.

Type
boolean

EnterTripped() → {boolean}

Description:
  • Enter Tripped State

Source:
Returns:

Always return true.

Type
boolean