跳到正文
Navigation

获取单个计划任务的详细配置

POST
https://your-panel.example.com:8888/crontab

获取指定 ID 的计划任务的完整配置信息。

Request body application/x-www-form-urlencoded required

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • action
    get_crond_find
    required

    具体操作名称。

  • id
    integer
    required

    计划任务 ID

Returns

default

接口响应,业务状态见下方详细说明。

JSON
  • id
    optional
    integer

    任务 ID

  • name
    optional
    string

    任务名称

  • type
    optional
    string

    执行周期类型

  • status
    optional
    integer

    1 启用 / 0 禁用

  • sBody
    optional
    string

    执行命令/脚本

各操作详细说明

get_crond_findaction=get_crond_find获取单个计划任务的详细配置

获取指定 ID 的计划任务的完整配置信息。

  • 路由:POST /crontab
  • action:get_crond_find

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 get_crond_find
id 是 Integer 计划任务 ID

输出参数

参数名称 类型 描述
id Integer 任务 ID
name String 任务名称
type String 执行周期类型
status Integer 1 启用 / 0 禁用
sBody String 执行命令/脚本

示例

请求

POST /crontab HTTP/1.1
action=get_crond_find&id=1

响应

{"id": 1, "name": "续签Let's Encrypt证书", "type": "day", "status": 1, "where_hour": 10, "where_minute": 15}

Type to search…

↑↓ navigate↵ selectEsc close