Schedule or trigger jobs in gitlab-ci

gitlab ci only: - schedules
gitlab ci variables
gitlab schedule merge
gitlab skip ci
gitlab ci refs
gitlab ci anchors
gitlab ci image
gitlab ci skip stage

I want to run a heavy test only once per day in Gitlab-ci. Is it possible schedule a job? Or is it possible to set it to manual and trigger it using the API?


It's possible to schedule a pipeline since GitLab 9.1, see: https://docs.gitlab.com/ce/user/project/pipelines/schedules.html

Currently (i.e. with version 9.2) it can be configured as follows:

  1. Navigate to your project's Pipelines ➔ Schedules and click the New Schedule button.
  2. Fill in the form
  3. Hit Save pipeline schedule for the changes to take effect.

Run jobs only when they are run by a scheduled pipeline, So in this case, both of these jobs are only triggered for pipeline schedules only: - schedules. But they are defined in the same .gitlab-ci.yml and  I want to run a heavy test only once per day in Gitlab-ci. Is it possible schedule a job? Or is it possible to set it to manual and trigger it using the API?


It's a patch up job, but you could use triggers with a if statement :

test_app:
  stage: test
  script:
  - if [ -n "${DO_TESTS}" ]; then make test; fi

And define the variable in the cron that make the call :

curl --request POST \
  --form token=TOKEN \
  --form ref=master \
  --form "variables[DO_TESTS]=true" \
  https://gitlab.example.com/api/v3/projects/9/trigger/builds

See the doc : https://docs.gitlab.com/ce/ci/triggers/README.html

Choose jobs in scheduled pipelines (#42313) · Issues · GitLab.org , It's possible to schedule a pipeline since GitLab 9.1, see: https://docs.gitlab.com/​ce/user/project/pipelines/schedules.html. Currently (i.e. with  Upload the repo including .gitlab-ci.yml to GitLab, it will trigger the job automatically, and you can go to CI/CD - Jobs on the repo admin. You can set schedule in CI/CD - Schedules section. It provides options as every day, every week, every month, or customize like cron interval.


Schedule or trigger jobs in gitlab-ci, Then we will use GitLab-CI to schedule it to run everyday. and select Schedules to set up a name and a timer for your periodic job to trigger. Schedule it to run everyday: click on the CI/CD icon to expand the menu, and select Schedules to set up a name and a timer for your periodic job to trigger. (11 seconds) (11 seconds) click on New schedule button Type in a name for the new schedule daily-bitcoin-price-job , select to run it daily then click Save Your scheduled job has been saved


How to get GitLab to do periodic jobs for you in under a minute, Automate scheduled builds with Hugo, Netlify, and GitLab's CI/CD pipeline to the repository triggers Netlify to pull, build, and deploy via Project Hook. Interestingly, for our scheduled deployment job, we don't need stages. GitLab CI/CD Pipeline Configuration Reference. GitLab CI/CD pipelines are configured using a YAML file called .gitlab-ci.yml within each project. The .gitlab-ci.yml file defines the structure and order of the pipelines and determines: What to execute using GitLab Runner. What decisions to make when specific conditions are encountered.


Automate scheduled builds with Hugo, Netlify, and GitLab's CI/CD , GitLab-CI is a continuous integration/deployment tool, it will trigger some scripts (​such as build, test, deployment) when there is new deployment  Today I'm showing you how to control the way Gitlab CI jobs get kicked off with three example use-cases. First I show you how to only trigger jobs for certain branch/tag naming patterns, then I


Use GitLab-CI to run free scheduled jobs, This feature was introduced in 9.1 as Trigger Schedule. and they will be available in GitLab CI so that they can be used in your .gitlab-ci.yml file. To configure that a job can be executed only when the pipeline has been scheduled (or the  Automating the testing process using GitLab CI: Trigger, Build & Run. All the jobs in stages run sequentially/parallel based on the runners available. Schedule the tests and make them