cmdop trigger
A trigger runs an agent prompt on a schedule. cmdop trigger adds, lists,
inspects, and disables them.
cmdop trigger add --name nightly-audit --prompt "Check disk usage and file an issue if any volume is over 85%"
cmdop trigger list
cmdop trigger history <id>Triggers that fail repeatedly are disabled automatically. Re-enabling one resets its error counter.
Add a trigger
cmdop trigger add \
--name nightly-audit \
--prompt "Check disk usage and file an issue if any volume is over 85%" \
--interval 86400cmdop trigger add --name five-min-ping --prompt "Report agent status" --cron '*/5 * * * *'| Flag | Purpose |
|---|---|
--name <name> | Required. Identifies the trigger. |
--prompt <text> | Required. The agent prompt to run on each fire. |
--interval <seconds> | Run interval in seconds. Default 3600 (one hour). |
--cron <expr> | Five-field cron expression. Mutually exclusive with --interval. |
--desc <text> | Optional description. |
Pass either --interval or --cron, not both. With neither, the trigger runs
hourly.
Inspect triggers
cmdop trigger list
cmdop trigger health <id>
cmdop trigger history <id>list shows every trigger and whether it is enabled. health shows one
trigger’s current state, including the consecutive-failure count that drives
auto-disable. history shows its execution record.
Enable, disable, and remove
cmdop trigger disable <id>
cmdop trigger enable <id>
cmdop trigger remove <id>enable also resets the error counter, which is what you run after fixing the
cause of an auto-disable. rm and delete are aliases for remove.
Related
- cmdop issue — the board a trigger can file into.
- Admin and policy
Last updated on