Run SecObserve Background Task
secobserve_run_periodic_taskTrigger a scheduled background job now to refresh stale metrics, or list registered task names to run later.
Instructions
Trigger one of SecObserve's scheduled background jobs now, or list which jobs exist.
Useful when a metric looks stale or housekeeping has not run. The task is queued, not executed inline: the call returns immediately and the outcome shows up in secobserve_list(resource="periodic_tasks"). Only one instance of a task runs at a time.
Args: task (Optional[str]): Registered task name. Omit to list the accepted names without running anything.
Returns: str: With no task, a JSON array of registered task names. With a task, a confirmation that it was queued and a pointer to the periodic_tasks resource for its outcome.
Examples: - Use when: "what background jobs can I run?" -> task omitted - Use when: "recalculate the metrics now" -> task="calculate_product_metrics" (confirm the exact name from the listing first). - Don't use when: you want to know whether metrics are stale (use secobserve_product_metrics with kind="status").
Error Handling: 400 means the name is not registered -- call without 'task' for the list. 409 means that task is already running; wait for it rather than retrying. Requires superuser; a product token gets 403.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | Registered task name. Omit to list the names this instance accepts instead of running anything. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |