Problem with scheduler


My goal is to create CI/CD scheduler that will run Android UI tests nightly and only on DEV branch, and also not to run those tests on any other even besides PLAY button in the CI/CD Scheduler screen. After looking at I have made the following YAML configuration:

stage: UITests
- android
- fastlane androidTest
- schedules AND dev

The idea is to make this job run on schedule only and on the branch named DEV. But… with this configuration, I wasn’t able to run this job manually with the play button from the CI/CD Schedulers screen. GitLab is showing a notification that the job is placed in the queue of the Pipeline, but the job wasn’t placed there. Oddly enough if I add -branches at the only: the PLAY button works but so does the job is triggered for git push, and on merge requests and so on.

Do you have any suggestions on what to do next with this job configuration?

Thank you for your time.

I have solved the problem. What was missing was keyword refs:

- schedules

With this everything worked as expected. Tests are running on PLAY button, and they are triggered by the scheduler.

There is also another solution, and that is to add a variable to the scheduler definition and than intercept it in the job configuration like so:


It is assumed that variable is called SCHEDULE and it has value TRUE.