awslabs / awslabs/cli-agent-orchestrator
Example: demonstrate the cao schedule lifecycle
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 267
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 70
Description
Parent: #588
## Goal
Turn the existing `examples/flow` surface into a focused example of the current `cao schedule` feature.
The sample should replace the trivia-only impression with a complete, observable schedule lifecycle while preserving the established `examples/flow` directory name.
## Scope
- Revise `examples/flow/` rather than creating a competing schedule directory.
- Add a README, runnable entry point, focused scheduled definition/profile, local fixture task, and tests.
- Demonstrate `cao schedule add`, `list`, `run`, `disable`, `enable`, and `remove`.
- Show the cron expression, next-run state, enabled state, manual trigger behavior, generated session naming, and cleanup.
- Include a deterministic local gating script if gating remains part of the current schedule contract.
- Use a harmless local task with an observable result; do not depend on trivia, remote APIs, or production infrastructure.
- Document the relationship and distinction between `cao schedule` and saved `cao workflow` artifacts.
## Acceptance criteria
- [ ] The example remains under `examples/flow/` and is consistently described as the `cao schedule` example.
- [ ] A user can add the definition, inspect it, trigger it manually, disable it, re-enable it, and remove it.
- [ ] The sample verifies the expected schedule metadata and launched session behavior.
- [ ] Any gating script has both allow and skip cases with deterministic assertions.
- [ ] The runnable path cleans up scheduled entries and launched CAO sessions on success or failure.
- [ ] Focused tests cover parsing/registration, lifecycle commands, gating, and cleanup without waiting for wall-clock cron execution.
- [ ] Documentation does not present schedule and workflow as interchangeable command surfaces.
## Non-goals
- Replacing `cao schedule` with `cao workflow`.
- Testing real production cron timing.
- Adding another scheduler implementation.
Contributor guide
Assessment
This issue has not been assessed yet.