Scheduler

The Scheduler runs scan jobs on a cron / interval schedule. Use it for nightly re-scans, hourly retests against critical endpoints, periodic re-coverage of a captured fleet — anything you want fired automatically without keeping the GUI open.

The scheduler is intentionally narrow: each job runs a scan (built-in scanner) against a target set of flows. To schedule other automation types (intruder runs, ratrace, custom commands), wrap them in a Workflow or Campaign and trigger that externally for now.

🔗Job Definition

A ScheduledScanJob carries:

  • name + description
  • targetFlowIds(Vec<Uuid>) (static set of flows) or Filter(FlowFilter) (dynamic filter re-evaluated each run, picks up new matching flows)
  • scan_config — JSON blob passed to the scanner (profile, enabled checks, concurrency, etc.)
  • frequencyCron("0 */6 * * *") or IntervalSecs(3600)
  • enabled flag
  • auto_export flag — auto-export results when the run completes
  • project_id — scope the job to a project

🔗Frequency Modes

Two modes (ScheduleFrequency):

🔗Cron

Standard 5-field cron expression. Examples:

  • 0 */6 * * * — every 6 hours
  • 0 2 * * * — daily at 02:00
  • 0 0 * * 1 — Mondays at midnight

The Scheduler parses with the cron crate and surfaces the next-run timestamp on the job row.

🔗Interval

Fixed seconds — IntervalSecs(900) for every 15 minutes, IntervalSecs(3600) for hourly. The job re-fires this many seconds after the previous run completes.

🔗Run History

Each job tracks ScheduledScanRun records: started/completed timestamps, scan ID produced, flow count scanned, findings count, status, and any error message.

The UI’s History tab on a job shows the chronological run list. Click a row to open the corresponding scan results.

🔗Toolbar Actions

  • + New Job — opens the create form
  • Run Now (per job) — manually trigger a one-shot run; doesn’t affect schedule
  • Pause / Resume (per job) — toggle enabled
  • Edit — inline form for name / target / config / frequency
  • Delete — removes the job and its run history

🔗Headless Use

In hugin serve mode (no GUI), the Scheduler is the primary way to run periodic scanning. Submit jobs via the REST API or MCP; results land in the same SQLite store.

🔗MCP

The scheduler MCP tool exposes 7 actions:

  • list — all jobs (filtered by project_id if active)
  • get — one job by ID
  • create — new job
  • update — modify any job field
  • delete — remove job + history
  • trigger — fire a job immediately, ignoring schedule
  • runs — fetch the run history for a job

🔗Notifications

The scheduler doesn’t ship a built-in notification system (webhook / email / desktop). Pipe completed-run events through Events or build a Workflow that listens for finding creation and posts to your channel of choice.