new memoryScheduler()
An in-memory implementation of scheduler.
Methods
-
<static> getTasks() → {Object}
-
Returns:
Promise
- Type
- Object
-
<static> init(_eventHandlerMap)
-
Parameters:
Name Type Description _eventHandlerMap
-
<static> isScheduled(eventID) → {Object}
-
Parameters:
Name Type Description eventID
Returns:
Promise
- Type
- Object
-
<static> schedule(eventID, context, interval, delay, exclusive, timeout) → {Object}
-
Schedule a task.
Parameters:
Name Type Description eventID
which event to fire
context
what to pass to the event
interval
The interval to invoke the callback
delay
The number of milliseconds after which the event will be fired for the first time.
exclusive
If true, then will not execute if another event named with the same eventID is already executing.
timeout
The number of milliseconds, after which the schedule will declare the event has timed out, and will fire the reject on any promise that was returned.
Returns:
Promise
- Type
- Object
-
<static> shutdown() → {Object}
-
Returns:
Promise
- Type
- Object
-
<static> unschedule(eventID) → {Object}
-
Parameters:
Name Type Description eventID
Returns:
Promise
- Type
- Object