Path: API › 计划任务

`POST /crontab`

获取用户自定义的计划任务分类列表。

## Request body

_Required._

- `action24.request_time` (string, required) — Unix 时间戳。
- `action24.request_token` (string, required) — 按 API 概览生成的签名。
- `action24.action` (string, required) — 具体操作名称。
  - one of `"get_crontab_types"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "get_crontab_types"
}
```

## 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_crontab_types"
```

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "msg": []
}
```

- `action24.response.default.status` (boolean, optional) — `true` 成功
- `action24.response.default.msg` (array<unknown>, optional) — 分类列表


## get_crontab_types

获取用户自定义的计划任务分类列表。

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

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `get_crontab_types` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 成功 |
| msg | Array | 分类列表 |

## 示例

```json
{"status": true, "msg": []}
```

