Skip to main content
Version: Next

ScheduledTask

A ScheduledTask represents a scheduled or cron job component in OpenChoreo. It defines the deployment configuration for scheduled task-type components by referencing a Workload and optionally a ScheduledTaskClass for platform-defined policies. ScheduledTasks are used for batch processing, periodic maintenance, or any workload that runs on a schedule.

API Version

openchoreo.dev/v1alpha1

Resource Definition

Metadata

ScheduledTasks are namespace-scoped resources that must be created within an Organization's namespace and belong to a Component through the owner field.

apiVersion: openchoreo.dev/v1alpha1
kind: ScheduledTask
metadata:
name: <scheduledtask-name>
namespace: <org-namespace> # Organization namespace

Spec Fields

FieldTypeRequiredDefaultDescription
ownerScheduledTaskOwnerYes-Ownership information linking the scheduled task to a project and component
workloadNamestringYes-Name of the workload that this scheduled task references
classNamestringNo"default"Name of the ScheduledTaskClass that provides deployment configuration

ScheduledTaskOwner

FieldTypeRequiredDefaultDescription
projectNamestringYes-Name of the project that owns this scheduled task (min: 1)
componentNamestringYes-Name of the component that owns this scheduled task (min: 1)

Examples

Basic ScheduledTask

apiVersion: openchoreo.dev/v1alpha1
kind: ScheduledTask
metadata:
name: data-cleanup-job
namespace: default
spec:
owner:
projectName: my-project
componentName: data-cleanup
workloadName: data-cleanup-workload
className: default

ScheduledTask with Custom Class

apiVersion: openchoreo.dev/v1alpha1
kind: ScheduledTask
metadata:
name: report-generator
namespace: default
spec:
owner:
projectName: my-project
componentName: reporting
workloadName: report-generator-workload
className: hourly-batch-job

Annotations

ScheduledTasks support the following annotations:

AnnotationDescription
openchoreo.dev/display-nameHuman-readable name for UI display
openchoreo.dev/descriptionDetailed description of the scheduled task