band cronjobs
The band cronjobs command group manages scheduled recurring tasks. A
cronjob is a saved (cron expression, prompt) pair attached to either a
project or a specific workspace. When the cron expression fires, Band sends the
prompt to a chat pane in that scope.
Storage key & ID
Every cronjob lives under a storage key:
a project name (for project-scoped jobs) or a workspace ID (for workspace-scoped
jobs). Inside that key the cronjob has a generated string ID like
cj_1234567890. All update / delete / trigger commands take both the key
and the ID.
List cronjobs
band cronjobs list
band cronjobs list --project my-app # filter by project
band cronjobs list --workspace ws_abc123 # filter by workspace Example output:
ID NAME CRON SCOPE STATE LAST RUN
cj_1701400000 review-prs 0 9 * * * project enabled ok
cj_1701400123 weekly-deps 0 0 * * 1 project enabled ok
cj_1701400456 integration 0 */6 * * * workspace disabled - Create a cronjob
The storage key is positional; everything else is named. --name,
--prompt, and --cron are required. The default scope is
project; pass --scope workspace --workspace-id <id>
for a workspace-scoped job.
band cronjobs create my-app \
--name "review-prs" \
--prompt "Review all open pull requests and post a summary" \
--cron "0 9 * * *"
# Workspace-scoped (key is the workspace ID; --scope and --workspace-id required)
band cronjobs create ws_abc123 \
--scope workspace --workspace-id ws_abc123 \
--name "ci-watch" \
--prompt "Check CI status and report failures" \
--cron "*/15 * * * *" Options:
key(positional, required) — project name or workspace ID, depending on scope.--name <name>— human-readable name (required).--prompt <text>— prompt sent to the agent (required).--cron <expr>— 5-field cron expression (required).--scope project|workspace— defaults toproject.--workspace-id <id>— required when scope isworkspace.--disabled— start the job disabled.
Common cron expressions
0 9 * * *— Every day at 9:00 AM0 0 * * 1— Every Monday at midnight0 */6 * * *— Every 6 hours30 8 * * 1-5— Weekdays at 8:30 AM0 0 1 * *— First day of every month at midnight
Update a cronjob
Both key and id are positional. Pass any of
--name, --prompt, --cron, --enable,
or --disable. --enable and --disable are
mutually exclusive.
band cronjobs update my-app cj_1701400000 \
--cron "30 8 * * 1-5" \
--prompt "Review open PRs and check CI status"
band cronjobs update my-app cj_1701400000 --disable Delete a cronjob
Pending runs are cancelled and the schedule is removed. Both key and id are positional.
band cronjobs delete my-app cj_1701400123 Trigger a cronjob
Manually fire a cronjob now, regardless of its schedule. This is the same as a normal cron tick — it sends the prompt to the configured chat pane and does not affect the next scheduled run.
band cronjobs trigger my-app cj_1701400000 JSON output
band cronjobs list --output json {
"jobs": [
{
"id": "cj_1701400000",
"key": "my-app",
"scope": "project",
"name": "review-prs",
"prompt": "Review all open pull requests and post a summary",
"cronExpression": "0 9 * * *",
"enabled": true,
"lastRunStatus": "ok"
}
]
}