# Schedule Builds Dynamically

**URL:** <https://discuss.bitrise.io/t/schedule-builds-dynamically/16630>\
**Category:** Question & Answer\
**Created:** [April 24, 2021, 4:37am UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630 "2021-04-24T04:37:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cellis-cricut](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@cellis-cricut](https://discuss.bitrise.io/u/cellis-cricut)\
**Post date:** [April 24, 2021, 4:37am UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630/1 "2021-04-24T04:37:34Z")

</div>

Is it possible to schedule a build for a dynamic branch pattern (e.g. `release/*`) that will kick off a build per branch that matches the pattern? So in this case, if I have two branches, `release/1.0.0` and `release/1.1.0`, two builds would be started, one for each branch?

---

<div class="post-metadata">

**Author:** ![anuerind](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anuerind](https://discuss.bitrise.io/u/anuerind)\
**Post date:** [April 26, 2021, 1:31am UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630/2 "2021-04-26T01:31:21Z")

</div>

At the moment I havent found a way to do that so we use a script to kick off the builds using the trigger-bitrise-workflow step.

---

<div class="post-metadata">

**Author:** ![cellis-cricut](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@cellis-cricut](https://discuss.bitrise.io/u/cellis-cricut)\
**Post date:** [April 26, 2021, 8:35pm UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630/3 "2021-04-26T20:35:46Z")

</div>

Good to know, I didn’t know about the trigger-bitrise-workflow step (I’m brand new to Bitrise.)

I’m struggling to see how to use the trigger step in a workflow after a script, as the trigger can only trigger a single build and workflows are linearly sequential without loops. I can see how using the trigger API and making curl requests from within a script step might work, though.

Would you mind elaborating on how you’ve structured your workflow with the script and trigger steps?

---

<div class="post-metadata">

**Author:** ![anuerind](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anuerind](https://discuss.bitrise.io/u/anuerind)\
**Post date:** [April 28, 2021, 10:42am UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630/4 "2021-04-28T10:42:10Z")

</div>

For the branch matching, we did a script and api call.

The trigger workflow was used for a finite number of variations and each one will only get scheduled if a specific variable is set (run\_if: ). The script handles the checkign of the criteria and setting of those variables prior to the trigger workflows being executed.

hth.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [May 28, 2021, 10:42am UTC](https://discuss.bitrise.io/t/schedule-builds-dynamically/16630/5 "2021-05-28T10:42:15Z")

</div>

Closed on May 28, 2021, 10:42am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
