Path: API › 计划任务

`POST /crontab`

获取指定计划任务的日志文件路径和大小。

## Request body

_Required._

- `action27.request_time` (string, required) — Unix 时间戳。
- `action27.request_token` (string, required) — 按 API 概览生成的签名。
- `action27.action` (string, required) — 具体操作名称。
  - one of `"get_log_path"`
- `action27.id` (integer, required) — 任务 ID

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "get_log_path",
  "id": 0
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/crontab" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=get_log_path" \
  --data-urlencode "id=<id>"
```

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "msg": {
    "log_path": "无",
    "size": "0B"
  }
}
```

- `action27.response.default.status` (boolean, optional) — `true`
- `action27.response.default.msg.log_path` (string, optional) — 日志文件路径，无日志时为 `无`
- `action27.response.default.msg.size` (string, optional) — 日志文件大小


## get_log_path

获取指定计划任务的日志文件路径和大小。

- **路由**：`POST /crontab`
- **action**：`get_log_path`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `get_log_path` |
| id | 是 | Integer | 任务 ID |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` |
| msg.log_path | String | 日志文件路径，无日志时为 `无` |
| msg.size | String | 日志文件大小 |

## 示例

```json
{"status": true, "msg": {"log_path": "无", "size": "0B"}}
```

