Skip to content

Allow using start_in: and rules: at the same time

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

We'd like to start a job delayed and we tried the following (syntax might be wrong):

job_a:
  rules:
    if $CI_PIPELINE_SOURCE == "schedule"
  when: delayed
  start_in: 1 hour

But we got the following error:

config key may not be used with `rules`: start_in

when looking up the documentation I haven't seen anything specific for rules: and start_in: (https://docs.gitlab.com/ee/ci/jobs/job_control.html#run-a-job-after-a-delay). What are we doing wrong?

Any other suggestion on how to delay a job? Any hint or recommendation is greatly appreciated

Our Gitlab release is: 15.11.10-ee

Edited by 🤖 GitLab Bot 🤖