All pages
Agentic pipelines · Lesson 1.2 · 12 min
Schedules and unattended runs
Run agent work on a timer and hear about it when it finishes.
After this lesson you can design agent work that runs while you're away: you pick the right kind of timer, decide in advance what the run may do without asking, make sure it stops on its own, and get told how it went.
Time: 12 minutes · Works on: macOS app and cloud.
Unattended means nobody to ask
When you sit beside the agent, every gap in your plan gets filled by a question. It asks which file you meant, waits for you to approve a command, and stops when it's confused. When it runs at 3 a.m., all of those become stalls or, worse, guesses.
So an unattended run is designed differently from an attended one. Before you schedule anything, answer four questions:
- Where does it run? On the Mac with TRMNLY open, on the Mac with TRMNLY closed, or in the cloud with no Mac at all.
- What may it do without asking? Anything that needs approval will wait for an approval nobody gives.
- How does it stop? A run limit, an expiry date, a cap on retries, a marker phrase. A schedule that can't stop is a cost that can't stop.
- How will you find out? A notification, a card on the board, a file, a pull request, an email. A run that finishes silently might as well not have run.
Pick the timer by where it must run
TRMNLY has three timers, and the right one follows from question 1.
| Timer | Runs | Needs | Good for |
|---|---|---|---|
| Scheduled run | A prompt to the agent, or a command in a pane | TRMNLY open | Work you want to watch happen, or read in the sidebar afterwards |
| Background job | A shell command, through launchd |
Nothing; survives quitting TRMNLY | Builds, syncs and data pulls with no model involved |
| Cloud job | A headless Claude Code run or a command in your box | A cloud workspace | Work that must happen when the Mac is asleep or shut |
A pattern that works well is to split one task across two timers: the mechanical part as a background job that can run any time, and the thinking part as a scheduled prompt that runs when the app is open. The job gathers data. The agent reads it.
Report first, act later
The safest unattended run produces something you read rather than something that changes your project. "Summarize what failed overnight and file a card for each" leaves you a board to review in the morning. "Fix whatever failed overnight" leaves you a repository you have to audit.
Start every new schedule as report-only. Once it has run a week and you trust what it reports, let it do one more thing, such as opening a draft pull request on its own branch. Moving a step at a time like this is the posture idea applied to time instead of to a single session.
Plan the approvals
A scheduled prompt runs under the agent's normal rules. If the run reaches a tool that needs approval, it waits. You have three honest ways to handle that:
- Design it out. Use read tools and tools that don't ask, such as the board and notes, and ask for a report instead of a change.
- Write standing rules. Approve the commands the run needs once, ahead of
time, with the Always… submenu on an approval card. A rule on
npm testcoversnpm testand nothing wider. - Approve from the phone. A paired iPhone gets approval requests as notifications, so a run that does need a yes can get one from wherever you are. The cloud and your phone sets this up.
Switching the posture to Auto-accept for the night is the fourth way, and the one to avoid. It removes the questions you'd most want asked.
A worked example: the morning dependency report
The goal: every weekday morning, a short list of outdated dependencies is on the board, with the risky ones flagged.
- A background job at 06:00 runs
npm outdated --json > .reports/outdated.json || true. It needs no model and runs even if TRMNLY was quit last night. The|| truematters, becausenpm outdatedexits non-zero when it finds anything. - A scheduled agent prompt at 08:30 on weekdays, scoped to the project: "Read .reports/outdated.json. For each major-version bump, add a card to the Tasks board titled with the package and the versions, with the changelog link in the notes. Don't change any files. When you're done, post a notification saying how many cards you added."
- Skip while the agent is mid-turn is on, so the report never lands in the middle of your own conversation.
- Make up a run missed while TRMNLY was closed stays on, because a report at 10:00 is still useful.
Notice what it doesn't do: it doesn't upgrade anything. Upgrading is a card on the board, picked up by you, an agent you're watching, or a fleet.
Do it in TRMNLY
- Show the right sidebar with
⌘⇧\, open More ▾ and choose Jobs. In Command, type thenpm outdatedline above. Do this from a tab in the project, because the job runs in that tab's working directory. Set Schedule to@daily 06:00and click Submit. Leave Keep alive off; it can't be combined with a schedule anyway. Schedules and background jobs covers this tab. - Open the Agent tab, click the gear in its header and, under Automation, choose Scheduled jobs…. The Scheduled runs sheet opens.
- Click Add. Name it "Dependency report", choose Agent prompt, paste
the prompt above, and set Schedule to
30 8 * * 1-5. - Expand Options. Turn on Skip while the agent is mid-turn. Set Stop after to a date a month out, so a schedule you forget about ends by itself. Leave Notify me if it stops on.
- Click Save, then Run on its row. Watch it work once while you're there. This is the run you'd otherwise be debugging blind at 08:30 tomorrow.
- Read the row afterwards. It shows when the schedule fires next and how the last attempt went. A line like "No terminal window for that project — will retry" means the run had nowhere to go, which is different from not being due.
- When the agent posts its notification, it uses the
post_notificationtool. That tool asks for approval, because you see and hear the result. Approve it once with Always… → Allow this tool, so the next morning's run doesn't wait on you. - Check the Awake monitor below the job list in Jobs. By default
TRMNLY keeps the Mac awake while a command runs, while the agent works and
while a command queue has work. The display still sleeps, and closing the
lid still sleeps the Mac, so leave the lid open for overnight runs. The
agent can also hold the Mac awake for a stated reason with
awake_acquire. - For longer unattended runs, take the agent lock before you leave, so nobody can type into the panes while the agent works. Lock the Mac and walk away covers it.
- You can also ask the agent to set all of this up: "Every weekday at 8:30,
read .reports/outdated.json and file a card for each major bump." It uses
schedule_create, and asks you to approve first. Ask it to scope the schedule to this project. A scoped prompt lands only in that project's sidebar, and waits rather than firing somewhere else when no window for the project is open. The sheet has no project field, so this is the way to scope one.
Pause all, at the top of the Scheduled runs sheet, stops every schedule at once without changing which ones are on. Use it before a demo, a release or a holiday.
When it must run with the Mac shut
Move the agent half to the cloud workspace's Jobs tab. A cloud job is either a headless Claude Code run with a landing mode of PR, push or report, or a command in your box. Cloud jobs read cron in UTC unless you give a timezone, and they're dispatched by a cron that ticks every 15 minutes, so a job starts at the first tick at or after its minute. Leave the landing mode on report until you trust the run.
Check yourself
- Your scheduled prompt ran once from Run and filed cards without changing any file.
- You can name the timer you'd use for a nightly build, a morning summary and a job that must run while the Mac is off.
- Your schedule has a way to stop on its own.
- The notification arrived without an approval waiting.
Go further
- Scheduled runs — quiet hours, jitter, backoff, and held versus failed versus stopped
- Background jobs — where job files live and the agent's job tools
- Awake — what keeps the Mac awake and what can't
- Read the audit trail — find out exactly what an overnight run did
- Prompts and runbooks — the prompts these schedules fire