gitlab-org--gitlab-foss/doc/ci/pipeline_schedules.md

1.9 KiB

Pipeline Schedules

Note

:

Pipeline schedules can be used to run pipelines only once, or for example every month on the 22nd for a certain branch.

Using Pipeline Schedules

In order to schedule pipelines, navigate to your their pages Pipelines ➔ Schedules and click the New Schedule button.

New Schedule Form

After entering the form, hit Save Schedule for the changes to have effect. You can check a next execution date of the scheduled trigger, which is automatically calculated by a server.

Taking ownership

Schedules list

Pipelines are executed as a user, which owns a schedule. This influences what projects and other resources the pipeline has access to. If a user does not own a pipeline, you can take ownership by clicking the Take ownership button. The next time a pipeline is scheduled, your credentials will be used.

Notes:

  • Those pipelines won't be executed precicely. Because schedules are handled by Sidekiq, which runs according to its interval. For exmaple, if you set a schedule to create a pipeline every minute (* * * * *) and the Sidekiq worker performs 00:00 and 12:00 o'clock every day (0 */12 * * *), only 2 pipelines will be created per day. To change the Sidekiq worker's frequency, you have to edit the trigger_schedule_worker_cron value in your gitlab.rb and restart GitLab. The Sidekiq worker's configuration on GiLab.com is able to be looked up at here.
  • Cron notation is parsed by Rufus-Scheduler.