{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commareports-com/json-schema/commareports-com-routine-schema.json",
  "title": "Routine",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commareports-com-openapi.yml#/components/schemas/Routine",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "report_id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "schedule_cron": {
      "type": "string",
      "description": "5-field cron expression."
    },
    "trigger_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "payload": {
      "description": "Arbitrary JSON forwarded verbatim to trigger_url on each tick."
    },
    "enabled": {
      "type": "boolean"
    },
    "last_run_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_run_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_run_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "next_run_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "skill_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "connector_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "report_id",
    "name",
    "schedule_cron",
    "enabled",
    "created_at",
    "updated_at"
  ]
}