CronOperation
A CronOperation creates Operations on a schedule,
like Kubernetes CronJobs. Use CronOperations for recurring operational tasks
such as database backups, certificate rotation, or periodic maintenance.
How CronOperations work
CronOperations contain a template for an Operation and create new Operations based on a cron schedule. Each scheduled run creates a new Operation that executes once to completion.
apiVersion: ops.crossplane.io/v1alpha1
kind: CronOperation
metadata:
name: daily-backup
spec:
schedule: "0 2 * * *" # Daily at 2 AM
concurrencyPolicy: Forbid
successfulHistoryLimit: 5
failedHistoryLimit: 3
operationTemplate:
spec:
mode: Pipeline
pipeline:
- step: backup
functionRef:
name: function-database-backup
input:
apiVersion: fn.crossplane.io/v1beta1
kind: DatabaseBackupInput
retentionDays: 7
important
CronOperations are an alpha feature. You must enable Operations by adding
--enable-operations to Crossplane's arguments.
Key features
- Standard cron scheduling syntax - Uses the same format as Kubernetes CronJobs
- Configurable concurrency policies (Allow, Forbid, Replace)
- Automatic cleanup of old Operations - Maintains history limits
- Tracks run history and running operations - Provides visibility into scheduled runs
Scheduling
CronOperations use standard cron syntax:
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)