ExecuteAutomationScheduledTask - Run a scheduled task immediately

Updated at:

Runs a scheduled task manually through OpenAPI without a request body. Returns the trigger event ID, which can be used with runs?eventId= to track the asynchronous execution result. When status is SKIPPED (started=false), no run is created and the event cannot be found in runs; use this response as authoritative. When status is CONDITION_ERROR (started=false), runs contains one run with status failed. Only scheduled tasks can be triggered manually. A paused task returns 409 rule_disabled.

Applicable editions

Central edition, Region edition

Endpoints and authorization information

  • Get the service endpoint: Replace {domain} in the API request syntax.
  • Get a personal access token。
  • Obtain organizationId: Required only for the Central edition. In the Organization Management console, go to the Basic Information page to obtain the organization ID.

Product

Resource

Required permission

Organization Management

Automation scheduled tasks

Read/Write

Request syntax

Central edition

POST https://{domain}/oapi/v1/platform/organizations/{organizationId}/automation/scheduled-tasks/{name}/trigger

Region edition

POST https://{domain}/oapi/v1/platform/automation/scheduled-tasks/{name}/trigger

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

Organization ID.

name

string

path

Yes

Task name.

Request examples

Central edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/platform/organizations/{organizationId}/automation/scheduled-tasks/{name}/trigger' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/platform/automation/scheduled-tasks/{name}/trigger' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

object

detail

string

Reason why the task was not started.

eventId

string

Event ID for this trigger. Use runs?eventId= to track the execution result.

manual:r-1:202607141200

runId

string

Run ID. Returned only if the run has started.

started

boolean

Indicates whether this run has started.

true

status

string

Raw trigger status returned by the engine. Valid values: MATCHED, SKIPPED, CONDITION_ERROR.

MATCHED

triggeredAt

string

Trigger time.

Response example

{
    "detail": "",
    "eventId": "manual:r-1:202607141200",
    "runId": "",
    "started": true,
    "status": "MATCHED",
    "triggeredAt": ""
}

Error codes

For API error codes, see the Error Code Center.