La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Productividad · SKILL.md

automation-pilot-scheduled-executions-api

automation-pilot-scheduled-executions-api

Manage SAP Automation Pilot scheduled executions via API. Use when creating, listing, updating, or deleting schedules for recurring or one-time command execution.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: automation-pilot-scheduled-executions-api description: Manage SAP Automation Pilot scheduled executions via API. Use when creating, listing, updating, or deleting schedules for recurring or one-time command execution.

SAP Automation Pilot Scheduled Executions API Management

This skill manages scheduled command executions in SAP Automation Pilot - creating, listing, updating, and deleting scheduled executions with flexible scheduling options and time zone support.

Prerequisites

  1. Set the following required environment variables:
export AUTOPI_HOSTNAME="emea.autopilot.cloud.sap"
export AUTOPI_USERNAME="your-username"
export AUTOPI_PASSWORD="your-password"
export AUTOPI_DEFAULT_CATALOG="mycommands-<<<TENANT_ID>>>"

For the full list of supported hostnames (emea, aus, apac, amer, ksa), see ../automation-pilot-content-management-via-api/SKILL.md → Prerequisites.

  1. Ensure curl is available in your environment.

Schedule Types

SAP Automation Pilot supports the following schedule types:

Once (One-time)

Execute once at a specific date/time.

"once": { "month": 12, "day": 31, "hour": 23, "minute": 30 }

Hourly

Execute at specified minutes within each hour.

"hourly": {
  "minutes": [0, 15, 30, 45]
}

Daily

Execute at specified time each day.

"daily": {
  "hours": [9],
  "minutes": [0]
}

Weekly

Execute on specified days of the week at a specific time.

"weekly": {
  "days": ["MONDAY", "WEDNESDAY", "FRIDAY"],
  "hours": [9],
  "minutes": [0]
}

Monthly

Execute on specified days of each month.

"monthly": {
  "days": [1, 15],
  "hours": [9],
  "minutes": [0]
}

Yearly

Execute on specific date each year.

"yearly": {
  "month": 1,
  "day": 1,
  "hour": 0,
  "minute": 0
}

Creating Scheduled Executions

curl -s -X POST \
  -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{
    "commandId": "my-catalog:MyCommand:1",
    "schedule": {
      "timeZone": "Europe/Berlin",
      "daily": {
        "hours": [9],
        "minutes": [0]
      }
    },
    "enabled": true,
    "inputValues": {
      "param1": "value1"
    },
    "description": "Daily morning check"
  }' \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions"

All inputValues entries must be strings on the wire, regardless of the declared parameter type — see ../automation-pilot-content-management-via-api/SKILL.md → "Values Are Always Strings on the Wire".


Managing Scheduled Executions

List All Schedules

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions"

Get Schedule Details

SCHEDULE_ID="your-schedule-id"

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions/$SCHEDULE_ID"

Enable/Disable Schedule

# PUT the full schedule body with "enabled" set to true or false
curl -s -X PUT \
  -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '<full schedule body with enabled changed>' \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions/$SCHEDULE_ID"

Delete Schedule

curl -s -X DELETE \
  -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions/$SCHEDULE_ID"

Updating Scheduled Executions

curl -s -X PUT \
  -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{
    "commandId": "my-catalog:MyCommand:1",
    "schedule": {
      "timeZone": "Europe/Berlin",
      "daily": {
        "hours": [10],
        "minutes": [0]
      }
    },
    "enabled": true,
    "inputValues": {}
  }' \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions/$SCHEDULE_ID"

Time Zones

List Available Time Zones

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/scheduled-executions/time-zones"

Common Time Zones

Time ZoneDescription
Etc/UTCCoordinated Universal Time (default)
Europe/BerlinCentral European Time (CET/CEST)
Europe/LondonBritish Time (GMT/BST)
America/New_YorkEastern Time (EST/EDT)
America/Los_AngelesPacific Time (PST/PDT)
Asia/TokyoJapan Standard Time
Asia/SingaporeSingapore Time
Australia/SydneyAustralian Eastern Time

Scheduled Execution Schema

Request Body (Create/Update)

{
  "commandId": "catalog:CommandName:version",
  "description": "Optional description",
  "correlationId": "optional-correlation-id",
  "tags": {},
  "inputValues": {
    "param1": "value1"
  },
  "inputReferences": [],
  "schedule": {
    "timeZone": "Europe/Berlin",
    "daily": {
      "hours": [9],
      "minutes": [0]
    }
  },
  "enabled": true
}

Error Handling

HTTP Status Codes

CodeDescription
200Success (GET, PUT)
201Created (POST)
204No Content (DELETE)
400Bad Request - invalid schedule or input
401Unauthorized - invalid credentials
403Forbidden - insufficient permissions
404Not Found - schedule doesn't exist
409Conflict - invalid state
429Rate Limited

Permissions Required

OperationPermission
List/Get schedulesRead
Create/Update/DeleteExecute

Common Errors

Command Not Found (409)

Error: Command "catalog:Command:1" not found

Verify the command ID exists and you have access to it.

Invalid Schedule (400)

Error: Invalid schedule configuration

Ensure only one schedule type is set (hourly, daily, weekly, monthly, or yearly).

Schedule Not Firing

Cause: Schedule is disabled or the time zone is misconfigured. Solution: GET the schedule and verify "enabled": true. Confirm the timeZone matches the intended region — a schedule set for Europe/Berlin at 09:00 fires at a different UTC time than one set for Etc/UTC.


Examples

Example 1: Create a daily health check schedule

User: "Schedule my health check command to run every day at 9 AM Berlin time"

  1. POST to /api/v1/scheduled-executions with commandId, enabled: true, and "daily": {"hours": [9], "minutes": [0]}
  2. Set "timeZone": "Europe/Berlin"
  3. Capture the schedule ID from the response
  4. Confirm with a GET that the schedule is enabled and the time is correct

Example 2: Update a schedule's timing

User: "Change my schedule to run at 10 AM instead of 9 AM"

  1. GET /api/v1/scheduled-executions/$SCHEDULE_ID to fetch the current body
  2. Modify the hours value in the response body to [10]
  3. PUT the full updated body back
  4. Confirm the response shows the new time

Example 3: Create an every-15-minutes monitoring schedule

User: "Run my monitoring command every 15 minutes"

  1. POST to /api/v1/scheduled-executions with "hourly": {"minutes": [0, 15, 30, 45]}
  2. Set "timeZone": "Etc/UTC"
  3. Verify the schedule is created and enabled
Skills guardadas