Resources / WorkflowSchedule

WorkflowSchedule

Starts a workflow at times given by cron expressions or fixed intervals, with a policy for runs that overlap and for times missed while the engine was down.

Overview

APIworkflow.etorm.com/v1alpha1
Resourceworkflowschedules (cluster-scoped inside its cluster)
Short nameswfsch
Available inproject clusters only
Statuswritten by a controller through /status

Minimal example

apiVersion: workflow.etorm.com/v1alpha1
kind: WorkflowSchedule
metadata:
  name: example
spec:
  namespaceRef:
    name: "<name>"
  times: {}
  action:
    workflowType: "<workflowType>"

Spec

FieldTypeRequiredDefaultAllowedDescription
namespaceRefreference to WorkflowNamespaceyesThe namespace whose workflows are started.
timesobjectyesWhen to start. At least one cron expression or interval.
times.cronlist of stringup to 10 itemsFive-field cron expressions (minute hour day-of-month month day-of-week) in the time zone.
times.intervalslist of objectup to 10 itemsFixed intervals.
times.intervals[].everySecondsintegeryes1 to 31536000Seconds between starts.
times.intervals[].offsetSecondsinteger00 to 31536000Seconds after the start of each period (counted from 1970-01-01 UTC).
times.timezonestring"UTC"up to 64 charactersTime zone of the cron expressions (UTC is the one supported at first).
times.jitterSecondsinteger00 to 3600Random delay added to each start, up to this many seconds.
times.startAtstringup to 40 charactersRFC 3339 time before which nothing starts.
times.endAtstringup to 40 charactersRFC 3339 time after which nothing starts.
actionobjectyesThe workflow to start.
action.workflowTypestringyeslength 1 to 255Workflow type name.
action.idPrefixstringup to 200 charactersWorkflow ids are this prefix, a dash and the scheduled time. Defaults to the schedule's name.
action.taskQueuestringup to 255 charactersTask queue; defaults to the type's.
action.inputstringup to 262144 charactersThe input, as JSON text.
action.executionTimeoutSecondsinteger0 to 157680000Longest each started workflow may run.
policiesobject{}What to do about overlap and missed starts.
policies.overlapstring (one of)"Skip"Skip, AllowAllSkip: no start while the previous one still runs. AllowAll: always start.
policies.catchupWindowSecondsinteger6000 to 31536000Starts missed while the engine was down run if they are not older than this; older ones are skipped.
policies.pauseOnFailurebooleanfalsePause the schedule when a started workflow fails.
pausedbooleanfalseNothing starts while true.

Status

FieldTypeRequiredDefaultAllowedDescription
phasestringPending (the namespace is not ready), Active or Paused.
nextActionTimeslist of stringThe next five start times (RFC 3339).
recentActionslist of objectThe last ten starts.
recentActions[].timestringScheduled time (RFC 3339).
recentActions[].workflowIdstringThe workflow that was started.
runningWorkflowsintegerStarted workflows still open.
numActionsintegerStarts so far.
lastActionAtstringWhen the last start happened (RFC 3339).
conditionslist of objectDetailed state, one entry per aspect.
conditions[].typestringAspect.
conditions[].statusstringTrue or False.
conditions[].reasonstringMachine-readable reason.
conditions[].messagestringHuman-readable detail.

Columns in listings

ColumnFrom
Namespace.spec.namespaceRef.name
Workflow.spec.action.workflowType
Paused.spec.paused
Next.status.nextActionTimes[0]
Phase.status.phase

All resources