From fe1f69442ce12a36987067f67ff0b9f33260af21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 12 Jun 2017 07:16:38 +0000 Subject: [PATCH] doc: add example of scheduler when --- doc/user/project/pipelines/schedules.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/user/project/pipelines/schedules.md b/doc/user/project/pipelines/schedules.md index d19d184f9b0..17cc21238ff 100644 --- a/doc/user/project/pipelines/schedules.md +++ b/doc/user/project/pipelines/schedules.md @@ -31,6 +31,26 @@ is installed on. ![Schedules list](img/pipeline_schedules_list.png) +## Using only and except + +To configure that a job can be executed only when the pipeline has been +scheduled (or the opposite), you can use +[only and except](../../../ci/yaml/README.md#only-and-except) configuration keywords. + +``` +job:on-schedule: + only: + - schedules + script: + - make world + +job: + except: + - schedules + script: + - make build +``` + ## Taking ownership Pipelines are executed as a user, who owns a schedule. This influences what