Skip to content

Migrating only:except to rules syntax for scheduled pipelines

Now that only:except is being deprecated in favour of rules, how do I configure a job to be executed only when the pipeline has been scheduled (or the opposite). Currently is is possible by https://docs.gitlab.com/ee/ci/pipelines/schedules.html#using-only-and-except

job:on-schedule:
  only:
    - schedules
  script:
    - make world

job:
  except:
    - schedules
  script:
    - make build