ListJobExecutions

更新时间:
复制 MD 格式

Returns a list of task instances.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

xxljob-b6ec1xxxx

AppName

string

No

The application name.

test-app

WorkflowExecutionId

integer

No

The workflow execution ID.

100

JobId

integer

No

The job ID.

74

JobName

string

No

The job name.

test-job

JobExecutionId

string

No

The job execution ID.

1310630367761285120

Status

integer

No

The job execution status. Valid values:

  • 0: UNKNOWN.

  • 1: WAITING.

  • 2: READY.

  • 3: RUNNING.

  • 4: SUCCESS.

  • 5: FAILED.

  • 6: PAUSED.

  • 7: SUBMITTED.

  • 8: REJECTED.

  • 9: ACCEPTED.

  • 10: PARTIAL_FAILED.

  • 11: SKIPPED.

  • 12: REMOVED.

4

StartTime

string

No

The start time.

2024-11-12 20:50:55

EndTime

string

No

The end time.

2024-11-12 20:50:56

PageNum

integer

No

The current page number.

1

PageSize

integer

No

The page size.

10

Response elements

Element

Type

Description

Example

object

Response schema.

Code

integer

The response code.

200

RequestId

string

The unique identifier for the request. Alibaba Cloud generates this ID to help troubleshoot issues.

6BCE89B3-E882-511D-9A75-D452A56EC4B1

Message

string

The error message returned if the request fails.

Parameter error: content is null.

Success

boolean

Indicates whether the request was successful.

  • true: The request was successful.

  • false: The request failed.

true

Data

object

The query result.

Records

array<object>

A list of job instances.

object

A job instance.

JobExecutionId

string

The job execution ID.

1310630367761285120

JobName

string

The name of the job.

test-job

JobType

string

The type of the job.

xxljob

Parameters

string

The parameters of the job.

name=zhangsan

ScheduleTime

string

The time when the job was scheduled.

2024-11-12 14:52:42

DataTime

string

The data timestamp for the job execution.

2024-11-12 14:52:42

EndTime

string

The time when the job execution ended.

2024-11-12 14:52:42

Executor

string

The ID of the executor.

1827811800526000

Result

string

The execution result.

success

Status

integer

The job execution status. Valid values:

  • 0: UNKNOWN

  • 1: WAITING

  • 2: READY

  • 3: RUNNING

  • 4: SUCCESS

  • 5: FAILED

  • 6: PAUSED

  • 7: SUBMITTED

  • 8: REJECTED

  • 9: ACCEPTED

  • 10: PARTIAL_FAILED

  • 11: SKIPPED

  • 12: REMOVED

4

TimeType

integer

The scheduling type. Valid values:

  • -1: none

  • 1: cron

  • 3: fix_rate

  • 5: one_time

  • 100: api

1

Attempt

integer

The attempt number for this execution. 1 indicates the initial run.

1

WorkAddr

string

The address of the worker that executed the job instance.

http://192.168.1.9:9999/

AppName

string

The name of the application.

test-app

RouteStrategy

integer

The strategy for routing the job to a worker. Valid values:

  • 1: Round-robin

  • 2: Random

  • 3: First

  • 4: Last

  • 5: Least Frequently Used

  • 6: Least Recently Used

  • 7: Consistent Hashing

  • 8: Sharded Broadcasting

1

ServerIp

string

The IP address of the scheduler node.

28.0.168.46

TriggerType

integer

The method that triggered the job. Valid values:

  • 0: unknown

  • 1: schedule

  • 2: rerun

  • 3: api

  • 4: user_retry

  • 5: system_retry

  • 6: manual

1

TotalTokens

integer

The total number of tokens consumed by the job execution.

1000

WorkflowName

string

The name of the parent workflow, if applicable.

myWorkflow

WorkflowExecutionId

string

The ID of the parent workflow instance, if applicable.

100

JobId

integer

The job ID.

74

Duration

integer

The duration of the job execution.

10

WorkflowId

integer

The ID of the parent workflow, if applicable.

10

XAttrs

string

The extended attributes.

{"sessionId":"ac21f9f6-5a88-4f97-abd1-b51989166035"}

Total

integer

The total number of entries found.

20

PageNumber

integer

The current page number.

1

PageSize

integer

The number of entries per page.

10

Examples

Success response

JSON format

{
  "Code": 200,
  "RequestId": "6BCE89B3-E882-511D-9A75-D452A56EC4B1",
  "Message": "Parameter error: content is null.",
  "Success": true,
  "Data": {
    "Records": [
      {
        "JobExecutionId": "1310630367761285120",
        "JobName": "test-job",
        "JobType": "xxljob",
        "Parameters": "name=zhangsan",
        "ScheduleTime": "2024-11-12 14:52:42",
        "DataTime": "2024-11-12 14:52:42",
        "EndTime": "2024-11-12 14:52:42",
        "Executor": "1827811800526000",
        "Result": "success",
        "Status": 4,
        "TimeType": 1,
        "Attempt": 1,
        "WorkAddr": "http://192.168.1.9:9999/",
        "AppName": "test-app",
        "RouteStrategy": 1,
        "ServerIp": "28.0.168.46",
        "TriggerType": 1,
        "TotalTokens": 1000,
        "WorkflowName": "myWorkflow",
        "WorkflowExecutionId": "100",
        "JobId": 74,
        "Duration": 10,
        "WorkflowId": 10,
        "XAttrs": "{\"sessionId\":\"ac21f9f6-5a88-4f97-abd1-b51989166035\"}"
      }
    ],
    "Total": 20,
    "PageNumber": 1,
    "PageSize": 10
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter Parameter error: %s. Parameter error: %s
401 IllegalRequest IllegalRequest: %s. Illegal request:%s
500 InternalError InternalError: %s. System Internal Error: %s
403 NoPermission No permission to perform this operation: %s. No permission to perform this operation: %s
404 NotFound Not found: %s. The resource does not exist: %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.