ish.io.daemon

Daemon mixin for ish.js

Source:
Author:
  • Nick Campbell
License:
  • MIT

Methods

[mixin] ish.io.daemon.halt(bConfirm) → {Array.<object>}

Source:
Halts all registered daemon functions.
From Mixin: ish.io.daemon.js must be included for ishJS to access this functionality.
Parameters:
Name Type Description
bConfirm boolean Value representing if all registered daemon functions are to be halted. true unregisters all functions; all other values leave the registered daemon functions unchanged.
Returns:
Type Description
Array.<object> Value representing the final status of all daemon functions that were successfully unregistered.

[mixin] ish.io.daemon.register(fn, vIntervalopt) → {integer}

Source:
Registers the passed function as a daemon executed at the passed interval.
From Mixin: ish.io.daemon.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Default Description
fn function Value representing the function to execute.
vInterval integer | string <optional>
ish.io.daemon.units.minute Value representing the number of milliseconds between invocations or the hh:mm to execute as a time string (in 24-hour format).
Returns:
Type Description
integer Value representing the ID of the registered daemon function or 0 if the call was unsuccessful.

[mixin] ish.io.daemon.status(iDaemonIDopt) → {object|Array.<object>}

Source:
Determines the status of the referenced daemon function.
From Mixin: ish.io.daemon.js must be included for ishJS to access this functionality.
Note: If iDaemonID isn't numeric, then all the status of all registered daemon functions are returned.
Parameters:
Name Type Attributes Description
iDaemonID integer <optional>
Value representing the ID of the registered daemon function.
Returns:
Type Description
object | Array.<object> Value representing the status of the referenced daemon function(s).

[mixin] ish.io.daemon.units() → {object}

Source:
Represents units of time as milliseconds.
From Mixin: ish.io.daemon.js must be included for ishJS to access this functionality.
Note: second, minute, hour, day and week are provided in the returned object.
Returns:
Type Description
object Value representing units of time as milliseconds.

[mixin] ish.io.daemon.unregister(iDaemonID) → {object}

Source:
Unregisters the referenced daemon function.
From Mixin: ish.io.daemon.js must be included for ishJS to access this functionality.
Parameters:
Name Type Description
iDaemonID integer Value representing the ID of the registered daemon function.
Returns:
Type Description
object Value representing the status of the referenced daemon function.