# Scheduling Build

**URL:** <https://discuss.circleci.com/t/scheduling-build/12180>\
**Category:** Build Environment\
**Tags:** ruby, cucumber, build-image, circle-yml\
**Created:** [April 25, 2017, 7:43am UTC](https://discuss.circleci.com/t/scheduling-build/12180 "2017-04-25T07:43:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tilakrajlw](https://avatars.discourse-cdn.com/v4/letter/t/e47774/32.png) [@tilakrajlw](https://discuss.circleci.com/u/tilakrajlw)\
**Post date:** [April 25, 2017, 7:43am UTC](https://discuss.circleci.com/t/scheduling-build/12180/1 "2017-04-25T07:43:12Z")

</div>

Hi All,  
I tried to schedule my build to run every night, i am using circle.yml and shell script to run the build.

Below are my circle.yml

```auto
# Customize dependencies
dependencies:
  pre:
    
 
## Running Tests

  
  test:
  override:
  - bundle install
  - bundle exec cucumber --format html --out reports.html features/workflow_1.feature:6 --format progress

```

and i am running the script from linux box are:

```auto
#!/bin/bash
#Src: https://circleci.com/docs/nightly-builds
 
_project=$1
_branch=$2
_circle_token=$3
 
trigger_build_url=https://circleci.com/api/v1/project/${_project}/tree/${_branch}?circle-token=${_circle_token}
 
post_data=$(cat <<EOF
{
  "build_parameters": {
    "NIGHTLY_BUILD": "true"
  }
}
EOF)
 
curl \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--request POST ${trigger_build_url}

```

And i am getting below errors;

```auto
[ec2-user@ip-172-31-35-230 circleci]$ sh script_circle.sh myproject1 master "APIKEY"
scripting starting
curl: (1) Protocol "“https" not supported or disabled in libcurl
{
  "message" : "{\"message\":\"API rate limit exceeded for 52.3.220.44. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://developer.github.com/v3/#rate-limiting\"}"
}script completing:

```

Also advise me if i am doing any thing incorrect.

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [May 2, 2017, 7:04am UTC](https://discuss.circleci.com/t/scheduling-build/12180/3 "2017-05-02T07:04:17Z")

</div>

Can you try to update the URL to match the [v1.1 API](https://circleci.com/docs/api/v1-reference/) and let me know if you still run into this issue?

---

<div class="post-metadata">

**Author:** ![KunalJain](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kunaljain/32/2086_2.png) [@KunalJain](https://discuss.circleci.com/u/KunalJain)\
**Post date:** [October 18, 2017, 8:48pm UTC](https://discuss.circleci.com/t/scheduling-build/12180/4 "2017-10-18T20:48:14Z")

</div>

We have launched a first-class way to run scheduled jobs on CircleCI.

Below, please find the links to get started:  
[https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow](https://circleci.com/docs/2.0/workflows/#scheduling-a-workflow)  
[https://circleci.com/docs/2.0/configuration-reference/#schedule](https://circleci.com/docs/2.0/configuration-reference/#schedule)

---

<div class="post-metadata">

**Author:** ![dieswaytoofast](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dieswaytoofast/32/16852_2.png) [@dieswaytoofast](https://discuss.circleci.com/u/dieswaytoofast)\
**Post date:** [October 18, 2017, 10:22pm UTC](https://discuss.circleci.com/t/scheduling-build/12180/5 "2017-10-18T22:22:47Z")

</div>

What happens when the schedules are in conflict?  
To be precise, if I push `develop` with `branches->only->develop`, and `master` with `branches->only->master`, which one wins? The most recent push?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:39am UTC](https://discuss.circleci.com/t/scheduling-build/12180/7 "2018-06-18T11:39:25Z")

</div>

Closed on June 18, 2018, 11:39am UTC


