GetJobExecution - 获取任务执行的详细信息

更新时间:
复制 MD 格式

获取任务执行的详细信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

GET  HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

ClusterId

string

是

集群 ID

xxljob-b6ec1xxxx

AppName

string

是

应用名称

test-app

JobExecutionId

string

是

任务执行 ID

1310630367761285120

MseSessionId

string

否

MSE 会话 ID。

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

Id of the request

39938688-0BAB-5AD8-BF02-F4910FAC7589

Code

integer

响应码

200

Message

string

错误信息

Parameter error: content is null.

Success

boolean

是否调用成功。

  • true:调用成功

  • false:调用失败

true

Data

object

任务执行的详细信息。

JobExecutionId

string

任务执行 ID

1310630367761285120

JobId

integer

任务 id

74

JobName

string

任务名称

天猫-自动审单

JobType

string

任务类型。

xxljob

Parameters

string

任务参数。

/home/avatar/system/services/biz/payment/crontab/monitorpayment.php

ScheduleTime

string

任务调度时间,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss。

2025-03-11 00:06:10

DataTime

string

任务数据时间,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss。

2025-03-11 00:06:10

StartTime

string

部署任务执行开始时间(秒,时间戳格式)。

2025-03-11 00:06:10

EndTime

string

过期时间,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss,格式为 YYYY-MM-DD HH:mm:ss。

2024-10-29 15:56:36

Duration

integer

运行总时长。

1

Executor

string

执行者 ID。

{'Status': 'NORMAL', 'ActiveCount': 4, 'UnavailableCount': 0, 'ExpectedCount': 4, 'RiskCount': 0}

Result

string

返回结果。

[]

Status

integer

任务执行状态。具体说明如下:

  • 0: UNKNOWN (未知)。

  • 1: WAITING (等待)。

  • 2: READY (准备就绪)。

  • 3: RUNNING (运行中)。

  • 4: SUCCESS (成功)。

  • 5: FAILED (失败)。

4

TimeType

integer

时间类型:

  • -1: none

  • 1:cron

  • 2: fixed_delay

  • 3:fixed_rate

  • 5:one_time

  • 100::api

1

Attempt

integer

失败尝试次数。

1

AppName

string

应用名称。

test-app

RouteStrategy

integer

路由策略。具体取值如下:

  • 1: 轮询

  • 2: 随机

  • 3: 第一个

  • 4: 最后一个

  • 5: 最不经常使用

  • 6: 最近最久未使用

  • 7: 一致性哈希

  • 8: 分片广播

1

ServerIp

string

调度节点。

172.3.27.76

TriggerType

integer

任务触发类型。具体说明如下:

  • 0:unknown。

  • 1:timer_schedule。

  • 2:rerun。

  • 3:api_run。

  • 4:user_retry。

  • 5:system_retry。

  • 6:manual。

timer_schedule

示例

正常返回示例

JSON格式

{
  "RequestId": "39938688-0BAB-5AD8-BF02-F4910FAC7589",
  "Code": 200,
  "Message": "Parameter error: content is null.\n",
  "Success": true,
  "Data": {
    "JobExecutionId": "1310630367761285120",
    "JobId": 74,
    "JobName": "天猫-自动审单",
    "JobType": "xxljob",
    "Parameters": "/home/avatar/system/services/biz/payment/crontab/monitorpayment.php",
    "ScheduleTime": "2025-03-11 00:06:10",
    "DataTime": "2025-03-11 00:06:10",
    "StartTime": "2025-03-11 00:06:10",
    "EndTime": "2024-10-29 15:56:36",
    "Duration": 1,
    "Executor": "{'Status': 'NORMAL', 'ActiveCount': 4, 'UnavailableCount': 0, 'ExpectedCount': 4, 'RiskCount': 0}",
    "Result": "[]",
    "Status": 4,
    "TimeType": 1,
    "Attempt": 1,
    "AppName": "test-app",
    "RouteStrategy": 1,
    "ServerIp": "172.3.27.76",
    "TriggerType": 0
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidParameter Parameter error: %s. 参数错误: %s
401 IllegalRequest IllegalRequest: %s. 非法请求:%s
500 InternalError InternalError: %s. 系统内部错误:%s
403 NoPermission No permission to perform this operation: %s. 没有权限去执行该操作:%s
404 NotFound Not found: %s. 资源不存在:%s

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。