Drone CI 中文文档

更新定时任务

更新指定名称的定时任务。请注意,这个 API 需要对存储库的写入权限。

1
PATCH /api/repos/{owner}/{repo}/cron/{name}

以下是请求体的示例:

1
2
3
4
5
{
  "name": "nightly",
  "expr": "0 0 1 * * *",
  "branch": "develop"
}

以下是响应体的示例:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "id": 1,
  "repo_id": 42,
  "name": "nightly",
  "expr": "0 0 1 * * *",
  "branch": "develop",
  "next": 1564120128,
  "pref": 1564116480,
  "created": 1564096971,
  "updated": 1564096971
}