In GitLab, why does a nightly pipeline schedule turn Inactive after its owner leaves the project, and what does Take ownership change?
answer
- whose identity runs the pipeline
- schedules run as their owner
- owner blocked or removed
- Take ownership: Maintainer or Owner
- job token follows the owner's access
basics
~20 sA GitLab pipeline schedule runs with its owner's permissions, so when the owner is blocked or removed from the project it turns Inactive. A Maintainer or Owner who selects Take ownership reactivates it, and it then runs with their permissions.
solid answer
~50 sWhoever creates a schedule becomes its **owner**, and every pipeline it starts runs with the owner's permissions — including which protected environments it can deploy to and what the `CI_JOB_TOKEN` can reach. When that person is blocked or removed from the project, there is no one for the pipeline to run as, so the schedule shows **Inactive**. A Maintainer or Owner fixes it with **Take ownership**, which makes them the owner: the schedule runs again, now with *their* access, which may be more or less than before. Creating or owning a schedule needs the Developer role or higher and a verified primary email, plus merge permission on the target branch if it is protected. Pressing **Run** to start a schedule by hand uses the presser's permissions and does not change the owner. Timing is a cron pattern, but GitLab only queues due schedules when its schedule worker runs, so they can start late.
go deeper
Remember that every GitLab pipeline schedule has an owner and runs with that person's permissions, so it stops when the owner loses access.
Explain why the schedule turns Inactive, who may Take ownership, how a manual Run differs, and why cron timing is limited by the schedule worker.
Treat taking ownership as an access change: check protected environments and job token reach under the new owner, and build schedule handover into offboarding.
Decide how an organisation assigns schedule ownership so that nightly jobs neither die with a leaver nor quietly run with more access than they need.
## Whose pipeline is it? A **pipeline schedule** starts a pipeline on a cron pattern for a chosen branch or tag, independently of pushes. Every pipeline needs a user to run as, and for a schedule that user is its **owner**: - Whoever **creates** the schedule becomes its owner. - The pipeline runs **with the owner's permissions**: it can reach the protected environments the owner can, and its **CI/CD job token** gets the owner's access level. - Creating a schedule requires the **Developer** role or higher and a **verified primary email**; a schedule that targets a **protected branch** also requires merge permission on that branch, and editing one that runs on a protected tag requires being allowed to create protected tags. - Only the owner can edit a schedule; anyone else must take ownership first. ## Why the schedule went Inactive If the owner is **blocked** or **removed** from the project, the schedule cannot run as them, and its status changes to **Inactive**. Nothing about the cron pattern or the configuration is wrong; the identity behind it is gone. Schedules also stop when the project or its group is **marked for deletion**. ## Take ownership: what it changes A user with the **Maintainer** or **Owner** role selects **Take ownership** next to the schedule. That reactivates it and changes more than a name in a column: | Aspect | Before | After Take ownership | |---|---|---| | Identity the pipeline runs as | the departed owner | the new owner | | Protected environments it can deploy to | the old owner's | the new owner's | | What the job token can reach | the old owner's access | the new owner's access | | Who can edit the schedule | the old owner | the new owner | So taking ownership is an **access decision**. If the new owner has more access than the old one, the nightly job quietly gains it; if less, it may now fail on a protected branch or environment. Pick an owner whose access matches what the job really needs. **Running by hand** is different: selecting **Run** on a schedule starts a pipeline with the permissions of the person who pressed it, not the owner's, and leaves ownership unchanged. A schedule can be run manually once per minute. ## Timing: cron, timezone and the schedule worker A schedule stores a **cron pattern** (or one of the preset intervals) and the timezone it is evaluated in. The cron is a request, not a promise: - GitLab queues due schedules only when its internal **pipeline schedule worker** runs, so a schedule cannot run more often than that worker. - On a self-managed instance the worker's default is `3-59/10 * * * *` — every ten minutes — and an administrator can change it with `gitlab_rails['pipeline_schedule_worker_cron']` in `gitlab.rb`. - On GitLab.com the scheduled pipeline cron is `*/5 * * * *`, so nothing runs more often than every five minutes. - When many schedules fire together, the worker processes them in batches, which can delay a start by minutes or more; staggering patterns (`5 * * * *`, `15 * * * *` rather than everything at `0 * * * *`) spreads the load. - GitLab.com also caps the number of schedules per project (10 on Free, 50 on paid tiers) and the pipelines each schedule may create per day (24 on Free, 288 on paid tiers). ## Offboarding a schedule owner 1. List the schedules each leaver owns before their account is blocked. 2. Decide who should own each one, based on the access the job needs rather than on who happens to be available. 3. Take ownership while the schedule is still active, then confirm the next run succeeds. 4. Review what the pipeline does with its job token and protected environments under the new identity.
- In GitLab, when a Maintainer presses Run on a colleague's pipeline schedule, whose permissions does that pipeline use?The Maintainer's. A manually run schedule uses the permissions of the person who started it, not the schedule owner's, and it does not change who owns the schedule. GitLab lets you run a schedule by hand at most once per minute.
- Why can a GitLab schedule with a cron of every minute still run only every few minutes?Due schedules are queued only when GitLab's pipeline schedule worker runs. Its self-managed default is `3-59/10 * * * *`, every ten minutes, and administrators can change `pipeline_schedule_worker_cron`; GitLab.com uses `*/5 * * * *`. Under load the worker also processes schedules in batches, adding further delay.
- In GitLab, what must be true before someone can own a schedule that targets a protected branch?They need the Developer, Maintainer or Owner role in the project, and merge permission on the protected target branch; creating a schedule also requires a verified primary email address. To edit a schedule that runs on a protected tag, they must be allowed to create protected tags.
A pipeline schedule is like a standing order signed by one employee: the bank pays it on that person's authority, stops when they leave, and restarts only when a manager re-signs it in their own name and lends it their own authority.
- Scheduled pipelines run as a system account, not as any user.
- A schedule keeps running normally after its owner is removed from the project.
- Any Developer can take ownership of a colleague's pipeline schedule.
- Taking ownership leaves the scheduled pipeline's permissions exactly as they were.
- A cron of every minute makes a GitLab.com schedule run every minute.