glab-schedule
Manage GitLab CI/CD pipeline schedules
TLDR
List schedules in the current repository
$ glab schedule list
List schedules in another repository$ glab schedule list --repo [owner]/[repository]
Create a schedule$ glab schedule create --cron "0 * * * *" --description "Hourly build" --ref main
Create a schedule with variables$ glab schedule create --cron "0 0 * * *" --description "Nightly" --ref main --variable "KEY:value"
Run a schedule now$ glab schedule run [schedule_id]
Change the cron expression$ glab schedule update [schedule_id] --cron "0 * * * *"
Delete a schedule$ glab schedule delete [schedule_id]
SYNOPSIS
glab schedule command [flags]
DESCRIPTION
glab schedule manages GitLab CI/CD pipeline schedules for the current Git repository, or for the project named with --repo. Aliases are sched and skd.A schedule stores a cron expression, a ref, a description, and optional variables. run starts one extra pipeline and does not change the next cron time.
PARAMETERS
-R, --repo owner/repository
Act on another project. A full Git URL is also accepted. Inherited by every subcommand.--cron expression
Cron recurrence, five fields.--ref branch-or-tag
Git ref the pipeline runs against.--description text
Label stored with the schedule.--active
On create, the schedule is active unless this is set false. On update, omitting it leaves the current state.
SUBCOMMANDS
list
List pipeline schedules. --output json prints JSON. --page and --per-page page the list.create
Create a schedule. --cron, --description, and --ref are required. --variable may be repeated as `key:value`. --cronTimeZone defaults to UTC. --active defaults to true.run id
Trigger one schedule immediately. The stored cron expression is unchanged.update id
Change cron, description, ref, time zone, or variables. Only the flags you pass are updated. --create-variable, --update-variable, and --delete-variable edit variables.delete id
Delete a schedule. Pipelines it already created stay.
INSTALL
sudo apt install glab
sudo dnf install glab
sudo pacman -S glab
sudo apk add glab
sudo zypper install glab
brew install glab
nix profile install nixpkgs#glab
CAVEATS
Create and update talk to the GitLab API for the authenticated account. glab auth must already have a token that can edit CI schedules on that project. Variable values are sent to GitLab as part of the schedule.
SEE ALSO
glab(1), glab-pipeline(1), glab-auth(1)
