跳到主要内容
版本:latest

GetCrontab

获取面板中所有计划任务的完整列表,包含任务配置、状态、执行周期等信息。

  • 路由POST /crontab
  • actionGetCrontab

输入参数

参数名称必选类型描述
actionString固定值 GetCrontab

输出参数

返回数组,每项:

参数名称类型描述
idInteger任务 ID
nameString任务名称
typeString周期类型:dayminute-nhourweekmonth
where1String周期值(天数/分钟数)
where_hourInteger执行小时
where_minuteInteger执行分钟
statusInteger1 = 启用,0 = 暂停
sTypeString任务类型:toShelltoUrlsitedatabaselogs
sBodyString执行内容
echoString唯一标识符
saveInteger备份保留份数

示例

POST /crontab HTTP/1.1
Content-Type: application/x-www-form-urlencoded

request_time=1700000000&request_token=xxx&action=GetCrontab
[{
"id": 1,
"name": "续签Let's Encrypt证书",
"type": "day",
"where_hour": 10,
"where_minute": 15,
"status": 1,
"sType": "toShell"
}]