跳到正文
Navigation

导出计划任务的执行日志到文件

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

将指定计划任务的执行日志导出到 /tmp/ 目录下的文件中。

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

  • request_time
    string
    required

    Unix 时间戳。

  • request_token
    string
    required

    按 API 概览生成的签名。

  • action
    download_logs
    required

    具体操作名称。

  • id
    integer
    required

    任务 ID

  • filename
    optional
    string

    自定义导出文件名

Returns

default

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

JSON
  • status
    optional
    boolean

    true 导出成功

  • msg
    optional
    string

    导出文件路径

各操作详细说明

download_logsaction=download_logs导出计划任务的执行日志到文件

将指定计划任务的执行日志导出到 /tmp/ 目录下的文件中。

  • 路由:POST /crontab
  • action:download_logs

输入参数

参数名称 必选 类型 描述
action 是 String 固定值 download_logs
id 是 Integer 任务 ID
filename 否 String 自定义导出文件名

输出参数

参数名称 类型 描述
status Boolean true 导出成功
msg String 导出文件路径

示例

{"status": true, "msg": "/tmp/016725dfa2dd9267d8d2ffe68522ed6b.log"}

Type to search…

↑↓ navigate↵ selectEsc close