Start Scheduler

Description

Start the Elasticsearch Scheduler for an existing job.

Warning

When a “STOPPED” Scheduler is re-started, it will continue processing input data from the next millisecond from when it was stopped. If your data contains the same timestamp i.e. it could be summarized by minute, then data loss is possible for the timestamp value that the Scheduler was stopped at, as the Scheduler may not have completely processed all data for that millisecond.

Definition

http://localhost:8080/engine/v2/schedulers/<jobId>/start
jobId:The identifier of the job to be started. This must be configured as a scheduled job.
start:The time specifying the start (inclusive) of the interval data will be analyzed. Defaults to an empty string. When empty, the analysis will start from the earliest time for which data is available or continue from where it was in the cases of starting a new job or an existing one respectively. If start is earlier than the timestamp of the latest processed record, it will be ignored and the Scheduler will continue from after the latest record timestamp. See Start & End Date Formats.
end:The time specifying the end (exclusive) of the interval data will be analyzed. If not specified, the Scheduler will run continuously. See Start & End Date Formats.

Method

POST

Returns

Status code 200 (Ok).

Errors

See the Error Codes documentation for the full list of errors that may be returned by the API.

Example Response

For example, using the cURL command line client, the command to start a job Scheduler is:

curl -X POST http://localhost:8080/engine/v2/schedulers/<jobId>/start

If successful the API acknowledges the action:

{
  "acknowledged":true
}

Start & End Date Formats

To specify the time range of the Scheduler use the start and end parameters. For example:

http://localhost:8080/engine/v2/schedulers/<jobId>/start?start=2014-01-22T06:00:00Z&end=2014-01-25T06:00:00Z

Date arguments can be specified using one of three formats:

  1. ISO 8601 format with milliseconds, for example
http://localhost:8080/engine/v2/schedulers/<jobId>/start?start=2014-01-22T06:00:00.000Z&end=2014-01-25T06:00:00.000Z
  1. ISO 8601 format without milliseconds, for example
http://localhost:8080/engine/v2/schedulers/<jobId>/start?start=2014-01-22T06:00:00+00:00&end=2014-01-25T06:00:00+00:00
  1. Seconds from the Epoch, for example
http://localhost:8080/engine/v2/schedulers/<jobId>/start?start=1390370400&end=1390629600

Note

When a URL is expected (e.g. in browsers), the “+” used in time zone designators has to be encoded as “%2B”.

Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where Z is accepted as an abbreviation for UTC time.