Skip to content

Scheduled Reports

A schedule turns a one-off report into a recurring artifact. Each schedule references a template (framework pack or custom), a scope, a period definition, and a delivery list, and runs automatically at the chosen recurrence.

Recurrence

HarborGuard schedules are defined by a recurrence label, not a free-form cron expression. Supported values:

ValueCadence
dailyEvery 24 hours
weeklyEvery 7 days
monthlyEvery 30 days
quarterlyEvery 90 days
annuallyEvery 365 days

The nextRunAt timestamp is recomputed after each successful run.

Period

A schedule's period controls the data window that each generated report covers:

  • { "type": "rolling", "days": 30 } — the last N days at the time of generation.
  • { "type": "fixed", "start": "2026-01-01", "end": "2026-03-31" } — a fixed window every report uses (typical for quarterly compliance reports).

Delivery

Compliance reports are delivered to email recipients. Each schedule's delivery.emails is a list of addresses that receive the rendered report when generation completes.

{
  "delivery": { "emails": ["compliance@example.com", "ciso@example.com"] }
}

For ad-hoc, non-compliance alerts (such as sla_breach or control_failed events) the platform also supports Slack, PagerDuty, and HMAC-signed webhook channels — those are configured separately under Notifications and routed via the compliance policy's notifications section.

Creating a schedule

curl -X POST \
  -H "Authorization: Bearer $HG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "soc2",
    "name": "SOC 2 quarterly evidence",
    "scope": { "mode": "org", "selectedTags": [] },
    "sections": ["exec_summary", "vuln_summary", "critical_high_tracker", "sla_compliance", "rbac_config", "audit_logs"],
    "period": { "type": "rolling", "days": 90 },
    "recurrence": "quarterly",
    "delivery": { "emails": ["audit-team@example.com"] }
  }' \
  "https://harborguard.co/api/report-schedules"

POST /api/report-schedules requires the admin role.

Managing schedules

ActionEndpoint
ListGET /api/report-schedules
UpdatePATCH /api/report-schedules/{scheduleId}
Pause / resumePATCH /api/report-schedules/{scheduleId} with { "paused": true }
DeleteDELETE /api/report-schedules/{scheduleId}

Each schedule's detail view shows lastRunAt, the artifact ID of the most recent run, and the computed nextRunAt.

See also

On this page