DocsAutomation
View as Markdown

Scheduled Agents

Run an agent on a schedule — nightly bug hunts, weekly docs passes, recurring test coverage — with a frozen launch snapshot, persistent memory across runs, and full run history.

A scheduled task launches a whole agent run — worktree, branch, provider, prompt, plugins, skills, attachments — at a time you pick, with nobody watching. Nightly bug hunts, weekly documentation passes, a coverage sweep every morning at six.

Open the list with the clock button in the toolbar, or from Schedule or View Scheduled Tasks in Agent Home.

Scheduling a task#

From a prompt you already wrote#

Compose the run in Agent Home exactly as you would to launch it now — pick the repository, base branch, agent, environment, attach files and skills, choose plugins — then use Schedule This Task… instead of sending.

Everything is captured as a launch snapshot: the repository and base branch, whether to start from origin, the worktree label, every agent selection, the environment and container image, the branch name, the prompt, @-mentioned paths, attachments, and any linked Linear or Sentry issue.

The plugin selection is frozen into a complete map rather than a list of deviations, so a run six months from now delivers the same plugins even if you've changed your defaults since.

Scheduled agent tasks require a Git repository.

From a recommendation#

The Scheduled Tasks view offers presets you can start from — a prompt, a sensible default schedule, and the tools it needs:

PresetCategoryDefault schedule
Find critical bugsCode QualityDaily, 4:00
Scan database for vulnerabilitiesSecurityDaily, 5:00
Generate docsDocumentationWeekly, Monday 9:00
Add test coverageTestingDaily, 6:00

Picking one does not start anything. It prefills an inactive draft with no repository bound — you review the prompt, choose where it runs, and activate it deliberately. A recommendation can never quietly attach itself to whatever repository happened to be open.

Schedules#

TypeExample
OnceAt a specific date and time
Every NRepeating interval (one minute minimum)
DailyHour and minute
WeeklyWeekday, hour, minute
MonthlyDay of month, hour, minute
CronA cron expression

Schedules carry a timezone, so a "daily at 04:00" task stays at 04:00 where you are, not where UTC is.

Shell tasks too#

A scheduled task can run a shell command instead of an agent — a nightly build, a cleanup script, a data refresh. Same schedules, same history, same run list. See Tasks for the on-demand equivalent.

Memory that survives runs#

This is what makes a recurring agent useful rather than amnesiac.

Each task owns named, persistent memory documents. A nightly bug-finder writes down what it already triaged; tomorrow's run reads that first and doesn't re-report the same twelve findings. A docs task records which sections it has covered.

Memory documents live outside the repository, so an automation can't accidentally commit its own notes. Agents append to them atomically; you can read and edit them from the Manage button in the task editor, or from the CLI:

bash
dev task memory.list task_id=<id>

Memory is on by default for agent tasks and can be switched off per task.

Running and watching#

ControlWhat it does
Active togglePause a task without deleting it
Run NowTrigger it immediately, off-schedule
EditChange the prompt, schedule, agent, or memory
Copy as JSONExport the whole task definition
DeleteRemove it

A Recent Runs panel spans every task; each task also has its own Run History. A past run shows its status, its shell output inline, and an Open Agent button that takes you to the session it created.

Runs are recorded as pending, running, launched, waiting, completed, failed, cancelled, retrying, or skipped, and note whether they were triggered by the schedule, by hand, or by a retry.

Scheduled runs are background operations: they don't steal focus, and they don't pop Agent Home open as a side effect.

Tasks that need something you haven't set up#

If a task's prompt depends on a plugin you haven't connected, the editor says Plugin unavailable and offers Manage Plugins… — rather than letting the run fail at 4 a.m. with an error nobody reads.

Remote hosts#

A task scheduled for a repository on a Remote SSH host is stored and run by that host's agentastic-dev-server, so it fires whether or not your Mac is awake. Those tasks appear under Remote Sessions → Scheduled Tasks rather than in the local list. Older servers are prompted to upgrade before they can accept scheduled work.

From the command line#

dev task lists, runs, pauses, deletes, and inspects the history of any task, and creates shell tasks outright:

bash
dev task list dev task run 8F9F52A8-7E4B-4B5D-B9D7-3D6F3F70D197 dev task create \ --name "Nightly Tests" \ --command "npm test" \ --schedule daily --hour 4 --minute 0

It also reaches task memory, which is how a scheduled agent reads and writes its own notes mid-run:

bash
dev task memory.read task_id=<id> dev task memory.append task_id=<id> content="Triaged #412; not a regression."

Agent tasks are composed in Agent Home — the snapshot carries far more than a command line — but every other operation is scriptable. See the Task CLI Reference for schedule formats, memory commands, and remote tasks.

  • Tasks — on-demand repository commands and custom Actions
  • Manager Agents — long-running agents that wake on a schedule and run other agents
  • Agent Home — where a scheduled run's snapshot is composed
  • Programmatic Control — driving Agentastic from external schedulers