Skip to main content

Scheduler

Cron for agents. The database wakes the agent, not a box you rent.

Tables

TablePurpose
scheduler.jobsNamed recurring or one-shot jobs per agent.
scheduler.runsEvery invocation, status, latency, error.

Model

A job is (agent_id, name, cadence, callback_url, secret). Cloud Scheduler ticks scheduler.due_runs() every minute; due jobs fire via Cloud Functions fetch to the agent's callback with an HMAC signature. On failure, runs are retried with exponential backoff up to max_attempts, then land in the dead-letter bucket.

Routes

MethodPathPurpose
POST/job/putCreate or replace a job.
POST/job/pausePause without deleting.
POST/job/deleteRemove.
POST/runs/listInspect recent runs.
POST/runs/retryManually re-queue a failed run.

Retention

agentpack_scheduler_reap_runs (03:57 UTC daily) trims old completed rows. Dead-letter runs are kept longer for diagnosis.

SLO

The reference deployment targets a dead-letter ratio under 1% of runs and late-by-more-than-2× count near zero.