Scheduler Processor
- 1. Scheduler
- 1.1. Starting a Task
- 1.2. Stopping a Task
1. Scheduler
The OPS Scheduler allows applications to start and stop periodic
tasks. A OPS task is defined by a OPS processor and
its inputs. You can start or stop a task at any time. The config
input
must conform to the following schema:
1.1. Starting a Task
You start a task by invoking the Scheduler processor with the
start-task
element. The following table describes the
configuration elements.
name
|
The name of the task |
---|---|
start-time
|
Either
now or a date in Java's
DateFormat
format.
|
interval
|
Interval between tasks in milliseconds. If set to 0 ,
the task runs only once.
|
synchronized
|
If set to true , the task won't run if the previous
iteration is still running. Defaults to false .
|
processor-name
|
The qualified name of the processor that is executed when the task runs. |
input
|
Inputs of the processor. The input can either be located in a separate file or inline. |
In most cases, the task is described in an XPL pipeline. The following example shows how to use the PipelineProcessor to launch a periodic task.
1.2. Stopping a Task
You can stop a task with the stop-task
element and the name of the
task.