/guardx:schedule — Automated Scheduled Scanning
Automate scheduled scans with customizable frequency and webhook notifications.
Trigger
User invokes /guardx:schedule or asks about "scheduled scan", "automatic re-scan", "cron scan", "recurring scan", "set up automated scanning", or "daily scan".
Steps
Listing existing schedules
If the user asks to "list", "show", or "view" schedules:
-
Call
list_scheduled_scans -
If no schedules exist, say: "No scheduled scans registered yet. Use
/guardx:scheduleto create one." -
Otherwise, display as a table:
Name Cron Last Run Next Run Last Result Status Production chatbot 0 9 * * * 2026-04-04T09:00Z 2026-04-05T09:00Z ✅ clean active
Creating a new schedule
-
Prompt source — ask: "Where is the system prompt?
- inline — paste it here
- file — provide a file path (e.g.
/path/to/prompt.txt)"
-
Scan frequency — ask: "How often should this scan run?
- daily (every day at 9am) →
0 9 * * * - weekly (every Monday at 9am) →
0 9 * * 1 - custom cron expression (5 fields, e.g.
*/30 * * * *)"
- daily (every day at 9am) →
-
Webhook (optional) — ask: "Should we notify a webhook URL when a regression is detected? If yes, provide the URL."
-
Severity threshold — ask: "Which severity levels should trigger the webhook notification?
- critical + high (default)
- critical only
- all (critical, high, medium, low)
- custom selection"
-
Confirm and create — call
create_scheduled_scan:Tool: create_scheduled_scan Arguments: name: <user-provided label> systemPrompt: <inline text> OR promptFile: <file path> cronExpression: <cron string> webhookUrl: <url or omit> webhookOnSeverity: <array or omit for default> -
Confirm creation — show:
✅ Scheduled scan created ID: <scheduleId> Name: <name> Schedule: <cronExpression> (plain-English interpretation) Next run: <nextRunAt> Webhook: <url or 'none'>
Deleting a schedule
If the user asks to "delete", "remove", or "cancel" a schedule:
- If no ID provided, call
list_scheduled_scansand ask which one to delete. - Call
delete_scheduled_scanwith thescheduleId. - Confirm: "Schedule
<name>deleted."
Webhook Payload (for reference)
When a regression is detected, the webhook receives:
{
"event": "regression_detected",
"scheduleId": "...",
"scheduleName": "Production chatbot daily scan",
"regressionCount": 2,
"newFindings": [...],
"scanId": "...",
"scannedAt": "2026-04-05T09:00:00Z",
"reportUrl": ".guardx/reports/{id}.html"
}
Notes
- Schedule files are stored in
.guardx/schedules/as JSON files. - The cron runner reads these on startup (
node-cron). - Use
/guardx:diffto manually compare two scans if you need an ad-hoc regression check. - Webhook fires only for severity levels in
webhookOnSeverity(default: critical + high).