关于 glab-schedule
glab schedule 是用于管理 GitLab CI/CD 计划任务的 glab 命令系列。它可列出、创建和删除计划任务,并支持 JSON 格式列表输出,便于结构化处理和自动化。
主要功能
- 01列出流水线计划任务
- 02创建和删除计划任务
- 03以 JSON 返回计划任务列表
- 04分页查看计划任务
- 05创建时验证变量键
适用场景
- 01在 Agent 审计中查看计划任务数据
- 02以结构化 JSON 读取计划任务列表
- 03创建带有经过验证变量的计划任务
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ vince-winkintel/ gitlab-cli-skills --skill glab-schedule安装后在 Claude Code 中输入/glab-schedule确认已加载。
附带文件references/commands.md
详细介绍
glab schedule
概述
Work with GitLab CI/CD schedules.
USAGE
glab schedule <command> [command] [--flags]
COMMANDS
create [--flags] Schedule a new pipeline.
delete <id> [--flags] Delete the schedule with the specified ID.
list [--flags] Get the list of schedules.
run <id> Run the specified scheduled pipeline.
update <id> [--flags] Update a pipeline schedule.
FLAGS
-h --help Show help for this command.
-R --repo Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
快速开始
glab schedule --help
结构化输出
glab schedule list 支持 --output json / -F json 以输出结构化数据,适用于 Agent 自动化。
人类可读的列表标题使用 API 报告的跨页总数,而不是将当前页的长度视为总数。JSON 仍仅包含已获取页面中的计划;使用 --page 和 --per-page 查看后续页面。请勿将标题中的总数误认为已完整获取的清单,也不要在只读审计中创建、更新、运行或删除计划。
# List schedules with JSON output
glab schedule list --output json
glab schedule list -F json
计划变量
创建计划前会验证计划变量键。空键会被拒绝,因此创建计划前请检查生成的 --variable <key>:<value> 输入。
子命令
完整的 --help 输出请参阅 references/commands.md。
评论
支持 Markdown