I try to set up a scheduled pipeline that runs every 20 mins. I use the customized cron syntax (*/20 * * * *
) in the setting, but gitlab doesn't honor this and still runs it every hour.
Is this a gitlab bug or did I miss something?
Check out GitLab schedules: it does mention:
The pipelines won't be executed precisely, because schedules are handled by Sidekiq, which runs according to its interval.
For example, if you set a schedule to create a pipeline every minute (
* * * * *
) and the Sidekiq worker runs on 00:00 and 12:00 every day (0 */12 * * *
), only 2 pipelines will be created per day.To change the Sidekiq worker's frequency, you have to edit the
pipeline_schedule_worker_cron
value in yourgitlab.rb
and restart GitLab.
New way for 12.8.X
To change the Sidekiq worker’s frequency: Edit the gitlab_rails['pipeline_schedule_worker_cron'] value in your instance’s gitlab.rb file. The exact line I have checked from gitlab.rb file is
# gitlab_rails['pipeline_schedule_worker_cron'] = "19 * * * *"
So uncomment the line and for example to run every minute do this.
gitlab_rails['pipeline_schedule_worker_cron'] = "* * * * *"
Reconfigure GitLab for the changes to take effect. Then go to job and add this in your job schedule, in this example it will run every 5 minutes :
*/5 * * * *
Older version 10.x.x the good way is. Edit the gitlab_ci['schedule_builds_minute'] = "0" value in your instance’s gitlab.rb file.
Please check the the official page, it's changing offen https://docs.gitlab.com/ce/user/project/pipelines/schedules.html#advanced-configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With