Skip to main content

How scheduling works

Hermes reads agent_job_schedule:{tenant} from KV at each CF Cron trigger (06:00 UTC daily). For each enabled schedule entry that matches the current day’s cadence, it POSTs a job to Hermes and logs the result. Schedules are stored in KV — no deploy required to add, modify, or disable them.

Creating a schedule

Use the Admin API to set the schedule for a tenant:

Schedule fields

Retrieving the current schedule

Pausing a job without deleting it

Set enabled: false in the schedule entry and PUT the full array back. The cron runner skips disabled entries.

Cadence reference

All cadences run at 06:00 UTC on the CF Cron trigger. Sub-day cadences (hourly, every-N-minutes) require a separate cron slot — contact support to add one.

Monitoring

Scheduled job runs appear in:
  • Cloudflare Workers Logs — filter by cron: hermes-scheduler
  • error_ledger D1 table — failed runs logged with action: "hermes_scheduled_job"
  • Slack alerts — if SLACK_WEBHOOK_URL is set, job failures trigger an alert

Best practices

  • Write agent messages as complete instructions — the agent wakes up with no prior context; be explicit
  • Use callback_url for enrichment jobs — so downstream systems know when CRM data is fresh
  • Disable before editing — set enabled: false, update the schedule, re-enable to avoid mid-run changes
  • Test with a job first — submit the same message + agent_type as an async job, verify the output, then add to schedule