Automation Commands¶
Commands for managing cron jobs, and workflow pipelines. See the Automation section for detailed documentation.
Cron Commands¶
Manage scheduled cron jobs that execute agent prompts on a recurring or one-time basis. Cron must be enabled in configuration (cron.enabled = true).
All human-readable lango cron output is routed through the Cobra command writer, so wrappers and tests can capture it by replacing cmd.OutOrStdout().
lango cron <subcommand>
lango cron add¶
Add a new scheduled cron job. Exactly one scheduling method must be specified: --schedule, --every, or --at.
lango cron add --name <name> --prompt <text> [scheduling flags] [options]
| Flag | Type | Default | Description |
|---|---|---|---|
--name |
string | required | Job name |
--prompt |
string | required | Prompt to execute |
--schedule |
string | Cron expression (e.g., "0 9 * * *") |
|
--every |
string | Interval (e.g., "1h", "30m") |
|
--at |
string | One-time execution (ISO8601: "2026-02-20T15:00:00") |
|
--deliver |
strings | Channels to deliver results (e.g., slack,telegram) |
|
--isolated |
bool | false |
Run in isolated session |
--timezone |
string | UTC |
Timezone for scheduling |
Scheduling Methods
Exactly one of --schedule, --every, or --at is required. They cannot be combined.
--scheduleuses standard cron syntax (5 fields: minute, hour, day-of-month, month, day-of-week)--everyuses Go duration format (e.g.,30m,1h,2h30m)--atuses ISO8601 format for one-time execution
Examples:
# Daily at 9 AM UTC
$ lango cron add \
--name "daily-news" \
--schedule "0 9 * * *" \
--prompt "Summarize today's top tech news" \
--deliver slack
Cron job "daily-news" created (id: a1b2c3d4)
Schedule: cron 0 9 * * *
Prompt: Summarize today's top tech news
Deliver to: [slack]
# Every hour
$ lango cron add \
--name "health-check" \
--every 1h \
--prompt "Check all server endpoints and report any issues" \
--isolated
# One-time scheduled execution
$ lango cron add \
--name "meeting-prep" \
--at "2026-02-25T15:00:00" \
--prompt "Prepare meeting notes for the Q1 review" \
--timezone "America/New_York"
lango cron list¶
List all registered cron jobs with their status and schedule.
This is a read-only inspection path; it does not mutate scheduler state.
lango cron list
Output columns:
| Column | Description |
|---|---|
| ID | Short job ID (first 8 characters) |
| NAME | Job name |
| SCHEDULE | Schedule type and expression |
| ENABLED | yes or no |
| LAST RUN | Last execution timestamp (or -) |
| NEXT RUN | Next scheduled execution (or -) |
Example:
$ lango cron list
ID NAME SCHEDULE ENABLED LAST RUN NEXT RUN
a1b2c3d4 daily-news cron 0 9 * * * yes 2026-02-20 09:00:00 2026-02-21 09:00:00
e5f6g7h8 health-check every 1h yes 2026-02-20 14:00:00 2026-02-20 15:00:00
i9j0k1l2 meeting-prep at 2026-02-25... yes - 2026-02-25 15:00:00
lango cron delete¶
Delete a cron job by ID or name.
lango cron delete <id-or-name>
| Argument | Required | Description |
|---|---|---|
id-or-name |
Yes | Job UUID or name |
Example:
$ lango cron delete daily-news
Cron job "daily-news" deleted.
$ lango cron delete a1b2c3d4-5678-...
Cron job "a1b2c3d4-5678-..." deleted.
lango cron pause¶
Pause a running cron job. The job remains registered but will not execute until resumed.
lango cron pause <id-or-name>
| Argument | Required | Description |
|---|---|---|
id-or-name |
Yes | Job UUID or name |
Example:
$ lango cron pause health-check
Cron job "health-check" paused.
lango cron resume¶
Resume a paused cron job.
lango cron resume <id-or-name>
| Argument | Required | Description |
|---|---|---|
id-or-name |
Yes | Job UUID or name |
Example:
$ lango cron resume health-check
Cron job "health-check" resumed.
lango cron history¶
Show execution history for a specific job or all jobs.
lango cron history [id-or-name] [--limit N]
| Argument | Required | Description |
|---|---|---|
id-or-name |
No | Filter by specific job (shows all if omitted) |
| Flag | Type | Default | Description |
|---|---|---|---|
--limit, -n |
int | 20 |
Maximum entries to show |
Example:
$ lango cron history
JOB STATUS STARTED DURATION RESULT
daily-news completed 2026-02-20 09:00:00 3.2s Top 5 tech stories: 1. AI breakthrough...
health-check completed 2026-02-20 14:00:00 1.1s All endpoints healthy
health-check failed 2026-02-20 13:00:00 5.0s ERR: timeout connecting to API server
$ lango cron history daily-news --limit 5
Workflow Commands¶
Manage multi-step workflow pipelines defined in YAML files. Workflows must be enabled in configuration (workflow.enabled = true). See Workflow Engine for YAML format details.
lango workflow <subcommand>
lango workflow run¶
Execute a workflow from a YAML definition file. Validation, schedule-not-implemented guidance, and direct execution status output are written through the Cobra command output stream so wrappers and test harnesses can capture them directly.
lango workflow run <file.flow.yaml> [--schedule <cron>]
| Argument | Required | Description |
|---|---|---|
file.flow.yaml |
Yes | Path to the workflow YAML file |
| Flag | Type | Default | Description |
|---|---|---|---|
--schedule |
string | Cron schedule to register (overrides YAML) |
Example:
$ lango workflow run ./daily-report.flow.yaml
Workflow: Daily Report Pipeline
Steps: 3
Executing workflow...
Workflow completed: completed
--- Step: fetch-data ---
Retrieved 42 records from the database...
--- Step: analyze ---
Analysis complete. Key findings: ...
--- Step: report ---
Report generated and sent to #reports channel.
If the workflow includes a schedule or you override with --schedule, the CLI validates the workflow and registers an enabled cron job. The cron job prompt asks runtime automation to invoke the workflow_run tool with the selected workflow file path; execution still happens later through the cron runtime.
$ lango workflow run ./report.flow.yaml --schedule "0 8 * * MON"
Workflow: Weekly Report
Steps: 3
Schedule: 0 8 * * MON
Workflow has a schedule.
Scheduled workflow registered as cron job (id: 2b7c4f5e-...)
Name: workflow:Weekly Report
Schedule: cron 0 8 * * MON
If direct execution is requested but the live runtime is unavailable or the workflow engine is disabled, the validated workflow summary is still emitted and the CLI explains why inline instead of failing with a silent stdout bypass. When direct execution does succeed, the same command stream carries the execution banner, final status, and per-step output.
lango workflow list¶
List workflow runs. The table output is written through the Cobra command output stream so wrappers and test harnesses can capture it directly.
lango workflow list [--limit N]
| Flag | Type | Default | Description |
|---|---|---|---|
--limit, -n |
int | 20 |
Maximum entries to show |
Example:
$ lango workflow list
ID WORKFLOW STATUS STEPS STARTED
a1b2c3d4 Daily Report Pipeline completed 3/3 2026-02-20 09:00:00
e5f6g7h8 Data Migration running 2/5 2026-02-20 14:30:00
i9j0k1l2 Weekly Summary failed 1/4 2026-02-19 08:00:00
lango workflow status¶
Show detailed status for a specific workflow run, including per-step progress. The detail output is written through the Cobra command output stream so wrappers and test harnesses can capture it directly.
lango workflow status <run-id>
| Argument | Required | Description |
|---|---|---|
run-id |
Yes | Workflow run ID |
Example:
$ lango workflow status a1b2c3d4
Run ID: a1b2c3d4
Workflow: Daily Report Pipeline
Status: running
Progress: 2/3 steps
Steps:
fetch-data completed agent=librarian
analyze completed agent=planner
generate-report running agent=operator
lango workflow cancel¶
Cancel a running workflow. The cancellation confirmation is written through the Cobra command output stream so wrappers and test harnesses can capture it directly.
lango workflow cancel <run-id>
| Argument | Required | Description |
|---|---|---|
run-id |
Yes | Workflow run ID to cancel |
Example:
$ lango workflow cancel e5f6g7h8
Workflow run e5f6g7h8 cancelled.
lango workflow history¶
Show workflow execution history across all workflows. The table output is written through the Cobra command output stream so wrappers and test harnesses can capture it directly.
lango workflow history [--limit N]
| Flag | Type | Default | Description |
|---|---|---|---|
--limit, -n |
int | 20 |
Maximum entries to show |
Example:
$ lango workflow history
ID WORKFLOW STATUS STEPS
a1b2c3d4 Daily Report Pipeline completed 3/3
e5f6g7h8 Data Migration cancelled 2/5
i9j0k1l2 Weekly Summary failed 1/4
m3n4o5p6 Daily Report Pipeline completed 3/3
lango workflow validate¶
Validate a workflow YAML file without executing it. Checks syntax, step dependencies, and DAG structure for cycles. Both table and JSON modes write through the Cobra command output stream so wrappers and test harnesses can capture validation output directly.
lango workflow validate <file.flow.yaml> [--output table|json]
| Argument | Required | Description |
|---|---|---|
file.flow.yaml |
Yes | Path to the workflow YAML file to validate |
| Flag | Type | Default | Description |
|---|---|---|---|
--output |
string | table |
Output format (table or json) |
Examples:
$ lango workflow validate ./daily-report.flow.yaml
Workflow "./daily-report.flow.yaml" is valid.
Name: Daily Report Pipeline
Steps: 3
Schedule: 0 9 * * *
$ lango workflow validate ./daily-report.flow.yaml --output json
{
"valid": true,
"file": "./daily-report.flow.yaml",
"name": "Daily Report Pipeline",
"steps": 3,
"schedule": "0 9 * * *"
}
$ lango workflow validate ./broken.flow.yaml
Error: validate "./broken.flow.yaml": ...
Tip
Run lango workflow validate before lango workflow run to catch structural issues early.