ZuloOne.Scheduler — remote agent
Updated
The scheduler exe is not a second copy of the database. It is an outbound agent: it connects to cloud Core over HTTPS, keeps a SignalR session on /hubs/agent, and runs TaskScriptBase jobs Core pushes as RunJob.
client machine cloud
ZuloOne.Scheduler.exe --HTTPS--> Core
SignalR /hubs/agent MetaJobs cron + queue
Execute Task script GET/POST /api/agent/*
GetService → REST invoke same IDataService, permissions = run token
What lives where#
| Piece | Where |
|---|---|
| Cron, queue, TTL, history | Core (JobSchedulerService, MetaJobRun) |
| Agent registry + enroll keys | MetaAgents |
| Live connections | AgentConnectionRegistry (this Core process) |
| Script execution | Agent process (RuntimeCompiler + AgentRemoteServices) |
| Run now, untargeted jobs | Core in-process (JobExecutor) |
Targeting#
TargetAgentName— that agent only.TargetTag— any online agent whoseTagscontain the tag.- Both empty — in-process on Core (unchanged
/jobsbehavior).
Offline: one queued slot, QueueTtlMinutes (default 15), then Expired. On reconnect Core flushes matching queued runs.
Auth#
- Admin creates an agent → one-time enroll key (
zuloone-agent.…). - Agent
POST /api/agent/session→ JWTkind=agent. - Dispatch issues a short
kind=agent-runtoken (optional run-as user, must be on the agent's allow-list). - Enroll key can only open a session. It cannot impersonate.
Host#
Microsoft.NET.Sdk.Worker: console, UseWindowsService, UseSystemd, src/ZuloOne.Scheduler/Dockerfile.
Install: Jobs → Task agents, pick Windows or Linux, download. Windows is a zip (MSI inside, already enrolled); Linux is a .deb. The zip wrapper on Windows is so Chrome does not flag an unsigned MSI as “not commonly downloaded”.
Fallback: ZuloOne.Scheduler.exe --enroll <public-core-url> <enroll-key> then --install-service. Core serves the MSI template and the linux-x64 tree from Agent:DistributionPath.
See also: wiki/developer/agents.md.