value: function scheduleEvent(eventKey) { var _this5 = this; var event = this.getEvent(eventKey); var schedule = later.parse.text(event.schedule); var scheduledEvent = later.setInterval(function () { _this5.callEvent(eventKey); }, schedule); return this.scheduledEvents[eventKey] = scheduledEvent; }
value: function scheduleAction(actionKey) { var _this4 = this; var action = this.getAction(actionKey); var schedule = later.parse.text(action.schedule); var scheduledAction = later.setInterval(function () { _this4.callAction(actionKey); }, schedule); return this.scheduledActions[actionKey] = scheduledAction; }
/** * Starts a reoccurring event if a schedule property is defined. * @param {Object} event An event object. */ scheduleEvent (eventKey) { let event = this.getEvent(eventKey) let schedule = later.parse.text(event.schedule); let scheduledEvent = later.setInterval(()=> {this.callEvent(eventKey);}, schedule); return this.scheduledEvents[eventKey] = scheduledEvent; }
/** * Starts a reoccurring action if a schedule property is defined. * @param {Object} action An action object. */ scheduleAction (actionKey) { let action = this.getAction(actionKey); let schedule = later.parse.text(action.schedule); let scheduledAction = later.setInterval(()=> {this.callAction(actionKey);}, schedule); return this.scheduledActions[actionKey] = scheduledAction; }