# Scheduled Reports

## What this page is for

Schedule recurring PDF reports to land in stakeholders' inboxes without an operator pulling them by hand. Compliance teams configure monthly board reports; SOC teams configure weekly incident summaries; finance configures quarterly billing reports.

## Sidebar location & role gating

* **Sidebar group**: Settings → Developer.
* **Path**: `/scheduled-reports`.
* **Keyboard hint**: none.
* **Minimum role for read**: `AUDITOR`.
* **Create, update, delete, run-now** require `ADMIN`.

## What you see

* **Reports table** — name, frequency (`weekly` / `monthly` / `quarterly`), framework (audit / EU AI Act / billing), recipients, next-run timestamp, last-run status.
* **"New report" form** — name, framework, frequency, recipient list (comma-separated), period offset.
* **Run-now button per row** — triggers an immediate run for testing.
* **Delivery history panel** — past runs with status and delivery timestamps.
* **Active toggle per row** — pause without deleting.

## Backend calls

| Action           | HTTP   | API path                                   | Service |
| ---------------- | ------ | ------------------------------------------ | ------- |
| List reports     | GET    | `/reports/scheduled`                       | api     |
| Create report    | POST   | `/reports/scheduled`                       | api     |
| Update report    | PATCH  | `/reports/scheduled/{id}`                  | api     |
| Delete report    | DELETE | `/reports/scheduled/{id}`                  | api     |
| Run now          | POST   | `/reports/scheduled/{id}/run`              | api     |
| Delivery history | GET    | `/reports/scheduled/{id}/history?limit=10` | api     |

## Auto-refresh & realtime

* **No auto-refresh.** The list reloads after actions.

## Per-agent scoping

No. Reports are tenant-level.

## Empty states

| Condition               | Copy shown                    | What to do                                   |
| ----------------------- | ----------------------------- | -------------------------------------------- |
| No reports configured   | `No scheduled reports`        | Click "New report".                          |
| Report has no past runs | `No deliveries recorded yet.` | The first scheduled run hasn't happened yet. |

## Edge cases & known gotchas

* **Recipient list parsing**: emails are comma-separated; whitespace is trimmed. Per-recipient delivery uses the platform's webhook layer.
* **Run-now does not block on delivery**: returns the queued status; check delivery history a minute later.
* **Stale "last-run failed" badge**: delivery worker may have failed on a transient SMTP issue. Re-run with the Run-now button.
* **Per-EC2 flap**: `/reports/*` proxies via the strict-prefix `reports/` rule.

## Related docs

* [API service](/services/operations-and-intelligence/api.md)
* [Audit service](/services/hot-path/audit.md) — produces the PDF content
* [Compliance UI](/ui/operations/compliance.md)

## Screenshot


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aegisagent.in/ui/settings-sub-pages/scheduled-reports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
