Skip to main content
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

string
required
Protocol version. Must be "aether/v1".
string
required
Resource discriminator. Must be "CronWorkflow".
object
required
Standard resource metadata identical to the Workflow resource.
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.

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.