Skip to content

Scheduler¤

The eccenca Build plugin Scheduler executes a given workflow at specified intervals.

Description¤

The Scheduler executes an existing workflow periodically. The workflow is specified via its name in the task parameter, and the period is set with the interval (number of minutes). The workflow will then be scheduled for a periodic execution without termination, i.e. it will run until cancelled or until an otherwise erroneous event occurs. In order to cancel a workflow, consider using the CancelWorkflow plugin.

Additionally to the period or interval of execution, we can also control the starting time with the parameter startTime. The required format for this starting time is the international standard ISO-8601. In a nutshell, the relevant formatting for us is PnDTnHnMn.nS, where P indicates the period, nD stands for the number of days, and nH, nM and nS are, respectively, the number of hours, minutes and seconds. Similarly to the P, the T introduces the time component, i.e. that part of the chronological information related to a given day in the sense of 24 hours.

Notice that the full ISO-8601 format is PnYnMnWnDTnHnMnS, which includes the portion "nYnMnW" for the number of years, months and weeks. In the case of this plugin, such long time periods should be avoided. That’s why we restrict ourselves to the (sub)format PnDTnHnMn.nS.

The scheduler can be disabled with the parameter enabled. It can also be made to stop after the first encountered error within a given execution of the specified workflow. This short-circuiting behavior may be useful in certain circumstances, so as to avoid the accumulation of errors (snowball effect).

Special considerations¤

The Scheduler will execute the given workflow periodically, regardless of the position in time of the start time. In other words: If the start time lies in the past, then the workflow will be executed (periodically) once the next period occurs. If the start time lies in the future, then this is simply a delay.

Relation to other plugins¤

As mentioned, the CancelWorkflow plugin can be used on par in order to cancel the otherwise never-ending execution of a workflow.

Parameter¤

Workflow¤

The name of the workflow to be executed

  • ID: task
  • Datatype: task
  • Default Value: None

Interval¤

The interval at which the scheduler should run the referenced task. It must be in ISO-8601 duration format PnDTnHnMn.nS.

  • ID: interval
  • Datatype: duration
  • Default Value: PT15M

Start time¤

The time when the scheduled task is run for the first time, e.g., 2017-12-03T10:15:30. If no start time is set, midnight on the day the scheduler is started is assumed.

  • ID: startTime
  • Datatype: string
  • Default Value: None

Enabled¤

Enables or disables the scheduler. It’s enabled by default.

  • ID: enabled
  • Datatype: boolean
  • Default Value: true

Stop on error¤

If set to true, this will stop the scheduler, so the failed task is not scheduled again for execution.

  • ID: stopOnError
  • Datatype: boolean
  • Default Value: false

Advanced Parameter¤

None

Comments