Services and schedules - what outlives your agent
In Dozable 0.60.10 the servers an agent depends on and the prompts it runs on a timer belong to Dozable, not to the agent's session, so they keep going when the agent crashes, restarts or the Mac reboots.
A long-running agent rarely works alone. It starts a dev server, a bridge or a logger from its terminal, and it runs something on a timer — "every 15 minutes, review the team's work". Until now both lived inside the agent's session: the servers were its child processes, and the timer was a loop in its conversation.
So when the agent stopped, they stopped too. Dozable could already bring a kept agent back after a crash or a restart, but it came back to a world where its servers were gone and its loop had ended, and someone had to set them up again.
In 0.60.10, on the stable channel now, both move out of the agent and into Dozable.
Services: programs Dozable keeps running#
A service is a long-running program that belongs to a workspace or to your Mac. Dozable starts it, restarts it if it crashes, and brings it back after a reboot, whatever happens to the agents.
# a dev server for the workspace "site", checked over HTTP
doz service add web --in site --folder ~/code/site --port 3000 --health http:/ -- npm run dev
# every service: who owns it, its state, port and health
doz service lsA service runs inside a fence by default, reading only its own folder; --no-fence runs it as you, after you confirm. Before a deploy, doz service pause web --for 10m stops anything from restarting it, and afterwards Dozable starts it again if it isn't running. doz service stop is never counted as a crash. If another program already holds the port, the add is refused rather than fighting it for the port. A program launchd already runs can be listed with --launchd LABEL, and Dozable leaves it alone.
Schedules: prompts on a timer#
A schedule types a prompt into an agent at set times. It belongs to the workspace, not to the agent's conversation, so it survives restarts and never expires.
# every 15 minutes, at the same minutes past each hour, but not overnight
doz schedule add review --in site --to manager --at :04,:19,:34,:49 \
--quiet-hours 20:00-06:00 --prompt "Review what the team finished since your last review."It only types when the agent is idle. If the agent is busy for an hour, the sends it missed become one, not four. Times and quiet hours are in your time zone (--zone for another), --prompt-file reads the prompt fresh at each send, and doz schedule run-now review sends it now.
In use#
The first real team moved onto services the evening 0.60.10 shipped: an agent bridge, a town server, an editor and a logger, which had all died with their agent at the last two reboots. On a test Mac first, a service came back about ten seconds after being killed, and on its own after a reboot.
Upgrade with doz upgrade. The manual's Services and Schedules pages have every option; the 0.60.10 post covers the rest of the release.