Skip to content

Monitoring and Scheduling

github-actions[bot] edited this page Oct 25, 2026 · 1 revision

This page is generated from the repository on every merge to main; changes made here are overwritten.

list_scheduled_workflows

List currently active recurring workflow schedules (session-scoped -- cleared when QGIS closes).

No parameters.

run_monitoring_workflow

Re-run a saved sequence of analysis tools (a 'monitoring workflow', see save_workflow_preset) in one shot and diff each step's per-unit results against the last time this preset was run -- e.g. re-running calculate_severity_index weekly and seeing which admin units moved into a worse severity class. Only read-only analysis tools are allowed as steps (calculate_severity_index, calculate_presence_gap, calculate_population_in_need, forecast_trend, field_statistics, population_access_gap, estimate_population_exposure) -- never geometry edits, file writes, or network-fetch tools, so an unattended recurring run can't silently repeat a destructive action or freeze the QGIS interface on a slow network call. For live hazard data (fire detections, GDACS alerts), call fetch_nasa_active_fires/fetch_nasa_eonet_events/fetch_gdacs_disaster_alerts directly instead -- they are not usable as a workflow step. The preset must be saved first via save_workflow_preset as '{"steps": [{"tool": "calculate_severity_index", "args": {...}}, ...]}'. The first run has nothing to compare against (previous_run_at is null); later runs report units_appeared/units_disappeared/units_changed per step, wherever that step's result contains a list of per-unit entries.

Parameter Type Required Description
preset_name string yes Name of a workflow preset already saved via save_workflow_preset.

schedule_recurring_workflow

Start re-running a saved monitoring workflow (see run_monitoring_workflow) automatically every interval_minutes, for as long as QGIS stays open with this plugin loaded. This is session-scoped, NOT a headless/background-service schedule -- it stops when QGIS closes or the plugin is unloaded, nothing runs while QGIS is closed. Each tick posts a short change summary into chat ('no changes since the last run', or a count of changed/new/dropped units) without an extra API call -- ask a follow-up question if you want the model to explain what changed. Starting a schedule for a preset_name that's already scheduled replaces the old schedule. Use stop_recurring_workflow to cancel, list_scheduled_workflows to see what's active. interval_minutes must be at least 1 (a shorter interval would hammer the QGIS UI thread with repeated geoprocessing), and at most 5 schedules can be active at once -- stop one first if already at that limit.

Parameter Type Required Description
preset_name string yes Name of a workflow preset already saved via save_workflow_preset.
interval_minutes number yes Minutes between runs. Must be at least 1.
max_runs integer no Optional: stop automatically after this many runs. Otherwise runs until QGIS closes or stop_recurring_workflow is called.

stop_recurring_workflow

Cancel a recurring workflow schedule started with schedule_recurring_workflow.

Parameter Type Required Description
preset_name string yes

Clone this wiki locally