Skip to content

Commit 563473f

Browse files
docs: add scheduled scanning documentation to README (#22)
The Temporal schedule feature was merged in #4 but the README had no documentation for it. Adds: - `SCHEDULE_*` env vars to the configuration table - Usage examples for enabling and customizing the cron schedule - Verification commands (`temporal schedule list/describe`) - Note about the create-or-update pattern for safe restarts Co-authored-by: Amp <amp@ampcode.com>
1 parent b19ed9f commit 563473f

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,34 @@ Version Guard is configured via environment variables or CLI flags:
262262
| `TAG_APP_KEYS` | Comma-separated AWS tag keys for app/service | `app,application,service` |
263263
| `TAG_ENV_KEYS` | Comma-separated AWS tag keys for environment | `environment,env` |
264264
| `TAG_BRAND_KEYS` | Comma-separated AWS tag keys for brand/business unit | `brand` |
265+
| `SCHEDULE_ENABLED` | Enable automatic scheduled scanning | `false` |
266+
| `SCHEDULE_CRON` | Cron expression for scan schedule | `0 6 * * *` (daily 06:00 UTC) |
267+
| `SCHEDULE_ID` | Temporal schedule ID (stable across restarts) | `version-guard-scan` |
268+
| `SCHEDULE_JITTER` | Random jitter to prevent thundering herd | `5m` |
265269
| `--verbose` / `-v` | Enable debug-level logging | `false` |
266270

271+
**Scheduled Scanning:**
272+
273+
Version Guard can automatically run scans on a cron schedule using the Temporal Schedule API. Disabled by default — enable with `SCHEDULE_ENABLED=true`:
274+
275+
```bash
276+
# Enable daily scans at 06:00 UTC (default)
277+
export SCHEDULE_ENABLED=true
278+
279+
# Or customize the schedule
280+
export SCHEDULE_ENABLED=true
281+
export SCHEDULE_CRON="*/30 * * * *" # Every 30 minutes
282+
export SCHEDULE_JITTER="2m"
283+
```
284+
285+
The schedule uses a create-or-update pattern — safe to restart the server without creating duplicate schedules. If the cron expression changes, the existing schedule is updated automatically.
286+
287+
```bash
288+
# Verify the schedule
289+
temporal schedule list --namespace version-guard-dev
290+
temporal schedule describe --schedule-id version-guard-scan --namespace version-guard-dev
291+
```
292+
267293
**Customizing AWS Tag Keys:**
268294

269295
Version Guard extracts metadata (service name, environment, brand) from AWS resource tags. By default, it looks for tags like `app`, `application`, or `service`. You can customize these to match your organization's tagging conventions:

0 commit comments

Comments
 (0)