Many workflows need to run on a schedule — nightly data exports, hourly health checks, daily report generation. Aether models scheduled execution through a first-classDocumentation 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.
CronWorkflow resource that pairs a standard cron expression with a WorkflowSpec. Each time the schedule fires, the engine submits a fresh workflow run on your behalf, tracks it alongside all previous runs from the same cron definition, and applies configurable concurrency policies to prevent overlapping runs from accumulating. The scheduler is crash-safe: when the engine restarts, it reloads all active CronWorkflow records from the store and re-registers their schedules automatically.
CronWorkflow Resource
ACronWorkflow is a top-level Aether resource with kind: CronWorkflow. Its spec wraps a standard WorkflowSpec alongside scheduling configuration:
CronWorkflow fires at the top of every hour and runs a single-task workflow.
CronWorkflowSpec Fields
| Field | Type | Description |
|---|---|---|
schedule | string | Standard five-field cron expression ("0 * * * *"). Required. |
timezone | string | IANA timezone name (e.g. "America/New_York"). Defaults to UTC. |
startAt | string | RFC3339 timestamp. Triggers before this time are suppressed. |
endAt | string | RFC3339 timestamp. Triggers after this time are suppressed. |
concurrencyPolicy | string | "Allow", "Forbid", or "Replace". Defaults to "Allow". |
startingDeadlineSeconds | *int | How many seconds late a trigger may fire. nil = no deadline. |
successfulJobsHistoryLimit | int | How many successful run records to retain. |
failedJobsHistoryLimit | int | How many failed run records to retain. |
suspend | bool | When true, scheduling is paused without deleting the resource. |
workflowSpec | WorkflowSpec | The workflow definition run on each trigger. Immutable after submit. |
Concurrency Policies
TheconcurrencyPolicy field controls what happens when a new trigger fires while a previous run is still active.
- Allow
- Forbid
- Replace
Multiple concurrent runs are permitted. Each trigger creates a new workflow run regardless of whether previous runs have finished. This is the default.Use
Allow when runs are truly independent and overlapping execution is acceptable.Bounded Scheduling Windows
startAt and endAt
Use RFC3339 timestamps to restrict when the cron schedule is active:
startAt or after endAt are suppressed. This is useful for seasonal or project-scoped workflows.
startingDeadlineSeconds
Controls how late a missed trigger may fire. If the engine is down when a trigger was scheduled, and the engine restarts within startingDeadlineSeconds, it fires the missed trigger. If the engine restarts later than the deadline, the trigger is dropped.
300 means the engine will fire a missed hourly trigger up to 5 minutes late. If startingDeadlineSeconds is null, there is no deadline and missed triggers are always fired on engine restart.
Engine API for CronWorkflows
Submitting
SubmitCronWorkflow returns a system-generated cronID. The WorkflowSpec is immutable after submit — to change it you must delete and re-submit.
Reading Status
Updating
Only mutable fields (schedule, timezone, startAt, endAt, concurrencyPolicy, startingDeadlineSeconds, suspend) can be updated. Attempting to change WorkflowSpec returns ErrValidation.
Pausing and Deleting
Enabling CronWorkflow Support
CronWorkflow support is opt-in. You must provide acron.Scheduler implementation via the WithCronScheduler option when creating the engine:
WithCronScheduler, calls to SubmitCronWorkflow, GetCronWorkflow, UpdateCronWorkflow, and DeleteCronWorkflow all return ErrNotSupported.
Crash Recovery
OnEngine.Start(), the engine reloads all active (non-suspended) CronWorkflow records from the store and re-registers their schedules with the cron.Scheduler. This means the scheduler survives engine restarts without data loss, subject to startingDeadlineSeconds for triggers that were missed during the downtime window.
WorkflowSpec is stored as an immutable snapshot at submit time. The engine uses the stored snapshot for every triggered run, so updating the CronWorkflow does not retroactively change what runs were launched with a previous spec.