Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BabySid/aether/llms.txt

Use this file to discover all available pages before exploring further.

The CronWorkflow resource wraps a standard WorkflowSpec with a cron schedule, giving you periodic, time-driven workflow execution without any external job scheduler. The engine stores an immutable snapshot of the definition at submit time and re-submits a fresh WorkflowRun on each schedule tick. CronWorkflow operations require a cron.Scheduler to be injected via WithCronScheduler; calling them without one returns ErrNotSupported.

Top-level fields

apiVersion
string
required
Protocol version. Must be "aether/v1".
kind
string
required
Resource discriminator. Must be "CronWorkflow".
metadata
object
required
Standard resource metadata identical to the Workflow resource.
spec
object
required
The cron workflow specification.

Example

The following example is taken directly from the engine’s integration test suite (28-cron-basic.json). It fires every hour on the hour and runs a single echo task.
{
  "apiVersion": "aether/v1",
  "kind": "CronWorkflow",
  "metadata": {
    "name": "cron-basic",
    "annotations": {
      "description": "Basic CronWorkflow: fires once, inner workflow completes successfully"
    }
  },
  "spec": {
    "schedule": "0 * * * *",
    "workflowSpec": {
      "entrypoint": "main",
      "templates": [
        {
          "task": {
            "name": "main",
            "inputs": {
              "parameters": [
                {
                  "name": "outputs",
                  "value": [
                    { "name": "result", "type": "string", "value": "cron-ok" }
                  ]
                }
              ]
            },
            "executor": { "type": "echo" },
            "outputs": {
              "parameters": [{ "name": "result", "type": "string" }]
            }
          }
        }
      ]
    }
  }
}
{
  "apiVersion": "aether/v1",
  "kind": "CronWorkflow",
  "metadata": {
    "name": "nightly-report",
    "namespace": "analytics",
    "labels": { "team": "data-eng" }
  },
  "spec": {
    "schedule": "0 2 * * *",
    "timezone": "America/New_York",
    "startAt": "2026-01-01T00:00:00Z",
    "endAt":   "2027-01-01T00:00:00Z",
    "concurrencyPolicy": "Forbid",
    "startingDeadlineSeconds": 300,
    "successfulJobsHistoryLimit": 7,
    "failedJobsHistoryLimit": 3,
    "suspend": false,
    "workflowSpec": {
      "entrypoint": "generate-report",
      "timeout": "45m",
      "templates": [
        {
          "task": {
            "name": "generate-report",
            "executor": { "type": "shell" },
            "outputs": {
              "parameters": [{ "name": "report-url", "type": "string" }]
            }
          }
        }
      ]
    }
  }
}

Immutability and updates

Use Engine.UpdateCronWorkflow to change scheduling parameters (schedule, timezone, concurrencyPolicy, startAt, endAt, suspend, startingDeadlineSeconds, history limits) without re-submitting. The engine re-registers the schedule with the cron backend automatically.
WorkflowRun records created by a CronWorkflow are not cascade-deleted when the CronWorkflow is deleted via DeleteCronWorkflow. Existing run history is preserved. Only future triggers are stopped.

Build docs developers (and LLMs) love