| name | glab-schedule |
| description | Manage GitLab CI/CD pipeline schedules using the glab CLI. Use this skill whenever the user wants to create, list, run, update, or delete scheduled pipelines (cron jobs). Trigger on phrases like "schedule a pipeline", "create a cron job for CI", "run pipeline every night", "list scheduled pipelines", "delete a schedule", or any GitLab pipeline scheduling task. |
GitLab Pipeline Schedule Management
Use glab schedule to manage scheduled pipeline runs (cron-based triggers).
Create a Schedule
glab schedule create \
--description "Nightly build" \
--ref main \
--cron "0 1 * * *"
glab schedule create \
--description "Business hours sync" \
--ref main \
--cron "0 8 * * 1-5" \
--cronTimeZone "Asia/Shanghai"
glab schedule create \
--description "Weekly report" \
--ref main \
--cron "0 9 * * 1" \
--variable REPORT_TYPE:weekly \
--variable NOTIFY:true
Required flags:
--description human-readable name (required)
--ref branch or tag to run on (required)
--cron cron expression (required)
Optional flags:
--cronTimeZone timezone (default: UTC)
--active enable schedule (default: true)
--variable KEY:value pipeline variable (repeatable)
Cron Expression Reference
┌─── minute (0-59)
│ ┌─── hour (0-23)
│ │ ┌─── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─── day of week (0-7, 0=Sun)
│ │ │ │ │
* * * * *
Common patterns:
0 1 * * * daily at 01:00 UTC
0 8 * * 1-5 weekdays at 08:00
0 */6 * * * every 6 hours
0 0 * * 0 weekly on Sunday midnight
0 0 1 * * first day of every month
List Schedules
glab schedule list
glab schedule list -O json
Run a Schedule Immediately
glab schedule run <schedule-id>
Triggers the scheduled pipeline right now, regardless of the cron time.
Update a Schedule
glab schedule update <schedule-id> --cron "0 2 * * *"
glab schedule update <schedule-id> --description "Updated name"
glab schedule update <schedule-id> --active false
Delete a Schedule
glab schedule delete <schedule-id>
Behavior Guidelines
- Timezone: Default is UTC — always ask or confirm the user's intended timezone for schedules that should run at business hours.
- Testing: After creating a schedule, offer to run it immediately with
glab schedule run <id> to verify it works.
- Variables: Use
--variable to pass schedule-specific values (e.g., ENV:production) that differ from the default pipeline variables.
- Disabling: Use
--active false to temporarily disable a schedule without deleting it.
- IDs: Use
glab schedule list -O json | jq '.[].id' to get schedule IDs for scripting.