Daemon Scheduler
The ADA daemon is a long-running background process that executes scheduled workers independently of active runs.
Architecture
ada daemon start
# Spawns: workers/daemon.js --daemon-worker (detached)
# ├── PID file → logs/daemon.pid
# ├── Log file → logs/daemon.log (daily rotation)
# └── Timers via setTimeout + setInterval
# ├── ultralearn → every 6h
# ├── consolidate → every 2h
# ├── audit → daily at midnight
# └── cve-scan → every 72h
ada daemon status # running | stopped + uptime
ada daemon stop # SIGTERM → graceful shutdown (2s grace period)
ada daemon logs # tail logs/daemon.logWorkers
| Worker | Frequency | Description |
|---|---|---|
ultralearn | every 6h | Distill trajectories into patterns; update ReasoningBank |
consolidate | every 2h | Merge duplicate insights, archive old trajectories |
audit | daily midnight | OWASP security audit on plugins and hooks |
cve-scan | every 72h | npm/pip CVE scan on project dependencies |
dashboard | manual | Generate SVG performance dashboard |
cost-report | manual | Detailed cost breakdown by agent/model |
team-sync-push | auto (≥5 responses) | Sync Thompson priors to remote team registry |
topic-wiki | manual | Generate wiki pages from trajectory clusters |
Custom Schedule
# ~/.ada.json — daemon.schedule overrides
{
"daemon": {
"schedule": {
"ultralearn": "4h", // min 1m, max 7d
"consolidate": "90m",
"audit": "48h",
"cve-scan": "7d"
}
}
}
# Supported formats: "6h" "30m" "90s" "2d"
# Run a worker manually now:
ada daemon run ultralearnGraceful Shutdown
SIGTERM → clears all timers → unlinks daemon.pid → 2-second grace period → exits. Never send SIGKILL unless the daemon is stuck.