Keep the computer usable
The line, the gate and the limit keep heavy jobs from piling onto one machine.
Slots
At most 2 jobs run at once by default (slots). The rest wait first come, first served, and leave with exit 75 after 60 minutes (--max-wait).
dotime-queue: in line: position 2, 3 min waited, wait limit 60 min; no free slot: 2 of 2 taken, by "shop-api: e2e" and "docs-site: build"dotime-queue: gave up: exit 75, position 1, 60 min waited; memory too low: 9% free, 20% needed; hint: --max-wait 0 waits without limitHealth gate
Before a job starts: load while the CPU is busy now, free memory, free disk and, on battery, the charge. The hint says which setting to lower on a small machine.
dotime-queue: in line: position 1, 0 min waited, wait limit 60 min; disk too low: 7.4 GB free, 10 GB needed; hint: the job starts once there is more free disk; to start with less, lower health.minFreeDiskGB in /home/you/.dotime/config.jsonLearned run limits
1.5 times the 90th percentile of passed runs of the command, or of its kind in that project, once there are 5; 30 minutes before that; never below 10. A new command gets its kind's learned limit, so give a long first run --max-run. At the limit the job and everything it started are stopped, exit 124.
dotime-queue: timed out: exit 124, stopped after 30 min; hint: the kind was taken as test (--kind <name> overrides it), and --max-run <min> sets the limit directlyPriority for a person's urgent run
--priority joins the line at the front; slots and the gate still apply, and the stop moves out to twice the limit. Keep it out of agent instructions.
dotime-queue run --priority --label "shop-api: hotfix tests" -- npm testDebug jobs
A question mark in the task part of the label, or a word like debug, repro, bisect or probe, makes a debug job, stopped after 15 minutes.
dotime-queue run --label "shop-api: does login work?" -- npm test -- loginStop wasted runs
The journal remembers what already passed and what keeps failing on the same code.
Passed checks are skipped
A test or lint job that already passed on the same clean commit, in the same folder, with the same command and code, exits 0 at once. --no-skip runs it anyway, and also reaches the runs nested in it.
dotime-queue: skipped: "shop-api: unit tests" already passed on commit 0a1b2c3d (12 min ago); --no-skip runs it anywayFail-stop
When the same check failed twice in a row on unchanged code within 6 hours, a third run is refused with exit 3 until the code changes or --after-fix "<note>" is given; the note goes into the journal.
dotime-queue: refused: exit 3; same check failed twice on unchanged code: "shop-api: unit tests", commit 0a1b2c3d, …; hint: change the code, or pass --after-fix "<note>" before the -- to run it anywayFlaky checks are flaggedOn main, next release
A check that passed and failed on the same clean commit within 14 days gets one more line after a failed run. Advice only: no exit code, skip or refusal changes. dotime-queue flaky lists them.
dotime-queue: flaky: this check passed and failed on the same commit 3 times in 14 days, last 2 h ago; the failure may not come from your changeshop-api: unit tests; mixed on 3 commits, 5 passes and 3 failures, last 2 h ago; command npm testNested runs
A queued job that calls the queue again, such as an npm test script that uses dotime-queue run, runs at once without a slot: at most 2 at a time per job (nestedPerJob).
dotime-queue: nested: inside "shop-api: ci", pid 48712See what happened
Every run leaves a line in the journal; three commands read it.
status
The taken slots, each running job with its limit and time left, the waiting jobs and the gate. It only reads the state folder.
slots: 2 of 2 taken, 1 waitingrunning "shop-api: unit tests": pid 48712, kind test, 4 min so far, limit 30 min, 26 min leftrunning "docs-site: build": pid 48713, kind build, 2 min so far, limit 12 min, 10 min leftwaiting 1 "mobile-app: e2e": pid 49511, 1 min so fargate: shut; no free slot: 2 of 2 taken, by "shop-api: unit tests" and "docs-site: build"passed
"Did this check already pass on exactly this code?" A stamp line and exit 0, or a no stamp: line that says why and exit 1. Useful before a build, which is never skipped.
stamp: commit 0a1b2c3d, passed 4 min ago by "shop-api: unit tests", command npm test, run time 2.5 min, tree clean at start, finished <date and time> UTChistory
Per project: outcome counts, skipped jobs and the minutes they saved, flaky checks On main, next release, and how long jobs waited and on which gate. --days or --day.
dotime-queue history --days 7Notices
A job that ran 5 minutes or more sends a done notice On main, next release; a job running far longer than usual, or idling in a slot, sends one too. They go to notify.log, the desktop (osascript or notify-send) and DOTIME_NOTIFY_CMD if you set it.
dotime: done shop-api: unit testspassed, exit 0, ran 12 minSet up the agents
One instruction in each project, or the same queue as MCP tools.
setup
Adds the queue instruction to AGENTS.md, CLAUDE.md and .claude/CLAUDE.md between markers; a second run only updates the block. Without --write it is a dry run. --mcp prints the MCP settings.
dotime-queue setup # shows what it would add, and changes nothingdotime-queue setup --write # adds itMCP server
dotime-mcp offers the queue as five tools: queue_status, queue_passed, queue_history, queue_run and queue_job. See the MCP guide.
claude mcp add --transport stdio dotime-queue -- dotime-mcpOptional extras
Off unless you schedule them. The queue works without both.
Reaper
Stops dev servers of your user account that sat idle for 30 minutes (under 10 CPU seconds), anywhere on the computer. --dry lists what it would stop; reaper.keepPattern protects servers. It also reports large test runs started outside the queue, overload and low disk.
node "$(npm root -g)/deployontime/queue/reaper.mjs" --dry # print what a run would do, change nothingScheduled-job report
Checks your own launchd jobs in ~/Library/LaunchAgents: loaded, last exit accepted, scripts present, log recent enough. It changes no job. macOS only for now.
node "$(npm root -g)/deployontime/queue/schedule-check.mjs" --drymacOS and Linux
The queue and the reaper work the same on Linux servers and desktops, x64 and arm64, reading /proc and /sys. Windows: not yet.
dotime-queue status