{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-task-xo-schema.json",
  "title": "TaskXO",
  "description": "Represents a task in Nexus Repository Manager",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/nexus-openapi.json#/components/schemas/TaskXO",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the task"
    },
    "name": {
      "type": "string",
      "description": "The name of the task"
    },
    "type": {
      "type": "string",
      "description": "The type identifier of the task"
    },
    "typeName": {
      "type": "string",
      "description": "The human-readable name of the task type"
    },
    "message": {
      "type": "string",
      "description": "A human-readable message describing the task"
    },
    "currentState": {
      "type": "string",
      "description": "The current state of the task"
    },
    "lastRunResult": {
      "type": "string",
      "description": "The result of the last run"
    },
    "nextRun": {
      "type": "string",
      "description": "The next scheduled run time (ISO 8601 format)",
      "format": "date-time"
    },
    "lastRun": {
      "type": "string",
      "description": "The last run start time (ISO 8601 format)",
      "format": "date-time"
    },
    "schedule": {
      "type": "string",
      "description": "The schedule type"
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "description": "Task-specific configuration properties"
      },
      "description": "Task-specific configuration properties"
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the task is enabled"
    },
    "alertEmail": {
      "type": "string",
      "description": "Email address to send notifications to"
    },
    "notificationCondition": {
      "type": "string",
      "description": "Condition for sending notifications",
      "enum": [
        "FAILURE",
        "SUCCESS_FAILURE"
      ]
    },
    "startDate": {
      "type": "string",
      "description": "The start date for scheduled tasks (ISO 8601 format)",
      "format": "date-time"
    },
    "recurringDays": {
      "type": "array",
      "description": "Days of the week/month for recurring schedules (1=Sunday, 7=Saturday, 999=last day of month)",
      "items": {
        "type": "integer",
        "description": "Days of the week/month for recurring schedules (1=Sunday, 7=Saturday, 999=last day of month)",
        "format": "int32"
      }
    },
    "cronExpression": {
      "type": "string",
      "description": "Cron expression for advanced schedules"
    },
    "timeZoneOffset": {
      "type": "string",
      "description": "Time zone offset for cron schedules"
    }
  }
}