{
  "type": "trigger",
  "source": "scheduler.js",
  "method": "timer",
  "input-schema": {
    "type": "object",
    "additionalProperties": false,
    "properties" : {
      "interval": {
        "type": "integer",
        "description": "Interval in milliseconds. Defaults to 1000 (1 second). A new instance will be triggered after each interval.",
        "required": true
      },
      "label": {
        "type": "string",
        "description": "Specify a unique string to identify this timer. e.g. 'clean_db', 'send_sms' etc.  If not specified, a unique label will be generated and returned in the output. This label can be used to update, pause, stop or resume the timer."
      },
      "triggerImmediately": {
        "type": "boolean",
        "description": "A flag to specify whether an instance should be triggered immediately. Useful if the interval is large and an instance is to be triggered immediately after the engine starts."
      }
    }
  },
  "output-schema": {
    "type": "object",
    "properties": {
      "label": {
        "type": "string",
        "description": "A string value identifying this timer. If mentioned in the input, the same value is copied here. Used for passing as input to the update, pause, stop and resume modules."
      },
      "seq": {
        "type": "integer",
        "description": "Count indicating the number of times a timer is instantiated."
      },
      "interval": {
        "type": "string",
        "description": "The current configured interval value."
      }
    }
  },
  "meta": {
    "name": "timer",
    "description": "Triggers a new instance at every interval specified."
  }
}