Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab CI\CD schedule pipline Interval

I created a .gitlab-ci.yml file in my Git project and I would like it to run every 5 minutes.

I created a new schedule in gitlab.com ( CI/ CD -> schedules -> new schedule) and used custom Interval Pattern with the pattern - * /5 * * * *

created a new schedule Interval Pattern

But this is not working, I saw that the pipeline run every hour and not every 5 minutes as I expected.

I used the pipeline schedules documentation and I saw that maybe the reason is that schedules are handled by Sidekiq and I need to edit gitlab.rb file -
enter image description here

I can't find what is this "gitlab.rb file", I tried to created it manually in my project, and tried to put this file in my project under etc/gitlab/, and this not working for me.

Please help me with this issue, if you know what I should do about the gitlab.rb file or do you have another idea of how to run ci/cd every 5 minutes.

Thank you!

like image 498
Noi Avatar asked Sep 06 '25 15:09

Noi


2 Answers

As you've found in the docs, how frequently a schedule is run is partially determined by the cron.

By default, the cron is run on the 19th minute of every hour, which means, it won't run more than once an hour unless the default has been changed.

The gitlab.rb file that needs to be edited is part of the GitLab installation (as the other poster mentioned), so you would either need to follow the configuration instructions to edit the file, or talk to whomever is the GitLab administrator for the instance you're using to change it.

For reference, the GitLab.com settings page lists the cron frequency for the SaaS version of GitLab.

like image 143
Arty-chan Avatar answered Sep 08 '25 09:09

Arty-chan


gitlab.rb file is part of Gitlab installation, i.e. not part of the project.

like image 22
Alexander Pavlov Avatar answered Sep 08 '25 10:09

Alexander Pavlov