Skip to content

Settings

Settings live in ~/.dotime/config.json. The file is optional: create it only to change a default. They apply to every caller of the state folder, so one agent cannot loosen a limit for the others.

On this page

config.json

~/.dotime/config.json
{ "slots": 3, "health": { "minFreeDiskGB": 25 }, "idle": { "serverIdleMin": 45 } }

No environment variable changes a setting. A caller can ask for more for one job only, through --max-run, --priority and --after-fix. DOTIME_HOME picks a whole other state folder, with its own settings, slots and journal.

A value that does not fit is replaced by its default, with one warning: the wrong type, a negative number, a number the table rules out, a time in milliseconds above 2147483647, or a pattern that does not compile. An unknown name is skipped with a warning. A file that is not valid JSON or cannot be read is ignored with one warning; only a missing file is silent.

Queue keys

Queue settings
KeyDefaultMeaning
slots2Jobs that may run at once. At least 1; a fraction is rounded down.
nestedPerJob2Nested runs one job may run at once; a further one waits for a place under that job.
mcpMaxJobs20Jobs started by dotime-mcp that may wait or run at once; queue_run refuses a further one.
flakyWindowDays14How many days back the flaky flag and dotime-queue flaky read the journal. On main, next release
notifyDoneMin5A job that ran at least this many minutes sends a done notice. 0 sends one for every job that ran. On main, next release
maxWaitMin60Default for --max-wait. 0: no limit.
pollMs3000How often a waiting job looks at the line and reads the health.
outputDirssee belowFolder names whose untracked files are left out when failed runs are compared.

Default outputDirs: node_modules, dist, build, out, coverage, .cache, .next, .turbo, .wrangler, .vercel, test-results, playwright-report.

Health gate keys

Health gate settings
KeyDefaultMeaning
health.loadPerCore1.0Gate shuts above this 1-minute load per core, while the CPU is busy now.
health.busyCpuPct90A high load shuts the gate only while this percent of CPU time, or more, is in use now.
health.minFreeMemPct20Gate shuts below this free memory, in percent.
health.minFreeDiskGB10Gate shuts below this free disk space.
health.minBatteryPct15Gate shuts at or below this charge while running on battery.

On macOS free memory is the percentage memory_pressure reports; on Linux MemAvailable as a share of MemTotal. A value that cannot be read never holds a job.

Limit keys

Run limit settings
KeyDefaultMeaning
limits.defaultMin30Run limit with fewer than limits.minSamples passed runs.
limits.debugMin15Run limit of a debug job.
limits.floorMin10Lowest measured run limit.
limits.p90Factor1.5Run limit as a multiple of the 90th percentile.
limits.longRunFactor2Long-run notice mark as a multiple of the 75th percentile.
limits.longRunUnmeasuredMin20Long-run mark with fewer than limits.minSamples passed runs.
limits.minSamples5Passed runs needed before history sets a limit.
limits.windowDays14How far back history is read.
limits.failWindowHours6How long two failures stay “in a row”.
limits.priorityGrace2A --priority job is stopped at this multiple of its limit.
limits.killGraceMs10000Time between TERM and KILL.
limits.orphanCheckMs2000How often a job checks that its queue process is alive.

Reaper keys

Reaper settings
KeyDefaultMeaning
idle.serverIdleMin30Idle window for dev servers.
idle.serverCpuS10CPU seconds below which a dev server is idle.
idle.slotIdleMin10Idle window for a job in a slot.
idle.slotCpuS5CPU seconds below which a job in a slot is idle.
reaper.overloadPerCore2.0Overload above this load per core.
reaper.overloadSwapPct80Overload above this swap use.
reaper.overloadMemPct10Overload below this free memory.
reaper.overloadDiskGB5Overload below this free disk space.
reaper.lowDiskGB20Early low-disk notice below this.
reaper.serverPatternsee belowRegular expression for dev-server commands.
reaper.keepPattern/Applications/|LaunchAgentsCommands the reaper never stops.

Default reaper.serverPattern: vite (but not vite build), vitest, next dev, wrangler dev, webpack serve, webpack-dev-server and nodemon. A one-shot test run such as vitest run is never taken for a dev server.

To protect your own server, add part of its command line:

~/.dotime/config.json
{ "reaper": { "keepPattern": "/Applications/|LaunchAgents|docs-site" } }

Environment variables

Environment variables
VariableDefaultMeaning
DOTIME_HOME~/.dotimeThe state folder. Callers share a queue only when they use the same folder.
DOTIME_TZUTCTime zone (an IANA zone name) for printed times and calendar days.
DOTIME_NOTIFYnot setlog: notices go to the log file only.
DOTIME_NOTIFY_CMDnot setShell command that receives each notice, with DOTIME_TITLE and DOTIME_MESSAGE in its environment.
DOTIME_JOBset by runNames the slot of the outermost job, also inside nested runs. Not a setting.
DOTIME_PARENTset by runNames a job's direct parent. Not a setting.
DOTIME_NO_SKIPset by run1 in a job started with --no-skip or one that could not be skipped; its nested runs are then never skipped.
Example: forward notices to a file
export DOTIME_NOTIFY_CMD='printf "%s: %s\n" "$DOTIME_TITLE" "$DOTIME_MESSAGE" >> "$HOME/queue-notices.txt"'

Files in the state folder

Files in the state folder
FileContent
config.jsonSettings. Optional.
slots/, line/One small file per running and per waiting job.
nested/, places/One file per nested run and per place it holds under its parent job.
journal.jsonlOne line per job: label, project, folder, times, wait and run minutes, outcome, exit, commit, kind, limit and the code hash.
notices/, notify.logLong-run and idle-slot notices, one file each, and every notice sent.
health.jsonThe last health reading of a waiting job, shared for up to pollMs and never past 5 seconds.
reaper-state.jsonCPU samples between reaper runs.
schedule-check.json, .jsonlRules and results of the scheduled-job report.
mcp-jobs/The jobs dotime-mcp started: request, pids, exit and output. Removed after 7 days, or beyond 200 finished jobs.
The journal and the logs are only ever added to. Delete or move them when they grow too large; the run limits, stamps and the repeated-failure stop then start again from no history. They hold working folders, full command lines and labels: keep that in mind before sharing them.
  • A state folder may only be used by processes on one computer that see the same process list. A container, a virtual machine or a second computer must not point at the same folder.

Written from the public repository's main branch and its queue manual.