An individual cron. There can be only one cron per branch on a repository.
If querying using the repository slug, it must be formatted using standard URL encoding, including any special characters.
Included when the resource is returned as part of another resource.
Name | Type | Description |
---|
id | Integer | Value uniquely identifying the cron. |
Included when the resource is the main response of a request, or is eager loaded.
Name | Type | Description |
---|
id | Integer | Value uniquely identifying the cron. |
repository | Repository | Github repository to which this cron belongs. |
branch | Branch | Git branch of repository to which this cron belongs. |
interval | String | Interval at which the cron will run (can be "daily", "weekly" or "monthly"). |
dont_run_if_recent_build_exists | Boolean | Whether a cron build should run if there has been a build on this branch in the last 24 hours. |
last_run | String | When the cron ran last. |
next_run | String | When the cron is scheduled to run next. |
created_at | String | When the cron was created. |
active | Unknown | The cron's active. |
This returns a single cron.
Template Variable | Type | Description |
---|
cron.id | Integer | Value uniquely identifying the cron. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
This deletes a single cron.
Template Variable | Type | Description |
---|
cron.id | Integer | Value uniquely identifying the cron. |
This returns the cron set for the specified branch for the specified repository. It is possible to use the repository id or slug in the request.
GET
/repo/{provider}/{repository.id}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
branch.name | String | Name of the git branch. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
GET
/repo/{provider}/{repository.slug}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
branch.name | String | Name of the git branch. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
GET
/repo/{repository.id}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
branch.name | String | Name of the git branch. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
Example:GET /repo/891/branch/master/cron
GET
/repo/{repository.slug}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
branch.name | String | Name of the git branch. |
Query Parameter | Type | Description |
---|
include | [String] | List of attributes to eager load. |
Example:GET /repo/rails%2Frails/branch/master/cron
This creates a cron on the specified branch for the specified repository. It is possible to use the repository id or slug in the request. Content-Type MUST be set in the header and an interval for the cron MUST be specified as a parameter.
curl -X POST \
-H "Content-Type: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token xxxxxxxxxxxx" \
-d '{ "cron.interval": "monthly" }' \
https://api.travis-ci.com/repo/1234/branch/master/cron
POST
/repo/{provider}/{repository.id}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.id | Integer | Value uniquely identifying the repository. |
branch.name | String | Name of the git branch. |
Accepted Parameter | Type | Description |
---|
cron.interval | String | Interval at which the cron will run (can be "daily", "weekly" or "monthly"). |
cron.dont_run_if_recent_build_exists | Boolean | Whether a cron build should run if there has been a build on this branch in the last 24 hours. |
POST
/repo/{provider}/{repository.slug}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
provider | Unknown | Documentation missing. |
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
branch.name | String | Name of the git branch. |
Accepted Parameter | Type | Description |
---|
cron.interval | String | Interval at which the cron will run (can be "daily", "weekly" or "monthly"). |
cron.dont_run_if_recent_build_exists | Boolean | Whether a cron build should run if there has been a build on this branch in the last 24 hours. |
POST
/repo/{repository.id}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
repository.id | Integer | Value uniquely identifying the repository. |
branch.name | String | Name of the git branch. |
Accepted Parameter | Type | Description |
---|
cron.interval | String | Interval at which the cron will run (can be "daily", "weekly" or "monthly"). |
cron.dont_run_if_recent_build_exists | Boolean | Whether a cron build should run if there has been a build on this branch in the last 24 hours. |
Example:POST /repo/891/branch/master/cron
POST
/repo/{repository.slug}/branch/{branch.name}/cron
Template Variable | Type | Description |
---|
repository.slug | String | Same as {repository.owner.name}/{repository.name}. |
branch.name | String | Name of the git branch. |
Accepted Parameter | Type | Description |
---|
cron.interval | String | Interval at which the cron will run (can be "daily", "weekly" or "monthly"). |
cron.dont_run_if_recent_build_exists | Boolean | Whether a cron build should run if there has been a build on this branch in the last 24 hours. |
Example:POST /repo/rails%2Frails/branch/master/cron