Scheduled automations
DevAgent automations run a prompt on a schedule from the CLI, so recurring triage, review, and maintenance tasks can start without you opening a worktree by hand. By the end of this page, you'll create a disabled automation, inspect it, and run it when you're ready.
Create a safe first automation
Start with --disabled while you tune the prompt and target:
devcore automations create \
--name "Weekday triage" \
--trigger weekdays \
--time 09:00 \
--prompt "Triage new issues and summarize blockers" \
--provider codex \
--repo my-repo \
--disabled \
--json--trigger accepts presets such as hourly, daily, weekdays, and weekly, plus cron expressions or RRULE strings. Use --timezone <tz> when the schedule should follow a specific IANA timezone instead of the runtime default.
Choose where runs happen
Use --repo <selector> when each run should create or select work in a repository. Use --workspace <selector> when the automation should run inside an existing DevAgent worktree instead:
devcore automations create \
--name "Nightly status" \
--trigger "0 18 * * 1-5" \
--prompt "Summarize today's changes" \
--provider claude \
--workspace active \
--disabledWhen you omit both target flags, DevAgent resolves the enclosing worktree from the current shell directory when it can.
Precheck before a run
Skip scheduled work when a cheap shell probe fails (non-zero exit records a skipped run):
devcore automations create \
--name "PR review" \
--trigger hourly \
--precheck "gh pr list --json number -q .[0].number" \
--prompt "Review requested PRs" \
--provider codex \
--repo my-repo \
--disabled \
--jsonProject host / setup targets
When the automation should run on a specific project host setup rather than only --repo / --workspace:
devcore automations create \
--name "Remote triage" \
--trigger daily \
--time 09:00 \
--prompt "Triage open issues" \
--provider claude \
--project <projectId> \
--host <hostId> \
--disabled \
--jsonUse --project-host-setup <id> when you already have a setup id. Optional --source-context '<json>' pins task/provider data to a host/account (pass null on edit to clear).
Missed-run grace
devcore automations edit <automationId> --missed-run-grace-minutes 30 --jsonReuse an existing automation session
For automations that target an existing worktree, add --reuse-session when later runs should continue in the previous live automation terminal instead of starting from a blank terminal each time:
devcore automations create \
--name "Inbox digest" \
--trigger hourly \
--prompt "Summarize unread mail" \
--provider codex \
--workspace active \
--reuse-session \
--disabledUse devcore automations edit <automationId> --fresh-session --json to switch the automation back to a fresh terminal per run.
Review and enable
List and inspect automations before enabling them:
devcore automations list --json
devcore automations show <automationId> --json
devcore automations edit <automationId> --enabled --jsonIn the desktop automations list, use the search field to filter by name, project, or prompt text when you have many schedules. External automations that live on an SSH host still appear as jobs you can manage (including delete) when that host is disconnected — you do not need an active SSH session just to remove a schedule.
Use edit to change the name, prompt, provider, target, schedule, or enabled state. remove deletes an automation and its run history.
Run on demand
After creating an automation, trigger it manually to check the prompt and target before waiting for the next scheduled time:
devcore automations run <automationId> --json
devcore automations runs --id <automationId> --jsonIf a run fails before it opens a workspace or reconnects to its target, open that run in DevAgent and click Rerun to queue a fresh manual run for the same automation.
Next steps
- DevCore CLI overview — see the rest of the CLI surface for worktrees, terminals, and browser control.
- Skills registry & MCP — install the DevCore CLI skill so agents can call the same commands.