Jobs /
Update job settings
Deprecated
This endpoint is deprecated and will be removed in the future. Please avoid making requests to this endpoint.
Requests should instead use the relevant PATCH endpoint.
Updates settings for the job
Required permission
Project > Jobs > General > Update
Path parameters
projectId
string requiredID of the projectjobId
string requiredID of the job
Request body
- {object}
backoffLimit
integerThe number of attempts to rerun a job before it is marked as failed.runOnSourceChange
stringConfigure when the job should be run if the source image changes.one ofnever, cd-promote, alwaysactiveDeadlineSeconds
integerThe maximum amount of time, in seconds, for a job to run before it is marked as failed.min1schedule
stringThe cron timer scheduling when to run the job. Required for cron jobs and unavailable for other job types.pattern(@(annually|yearly|monthly|weekly|daily|hourly))|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5})concurrencyPolicy
stringWhether this job should run when another instance of the job is already running. Only available for cron jobs. `allow` will enable multiple instances of this job to run. `forbid` will keep the current instance of the job running and stop a new instance from being run. `replace` will terminate any currently running instance of the job and start a new one.one ofallow, forbid, replace
Response body
- {object}Response object.
data
{object} requiredResult data.
API
CLI
JS Client
POST /v1/projects/{projectId}/jobs/{jobId}/settings
Example request
Request body
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"backoffLimit":0,"runOnSourceChange":"never","activeDeadlineSeconds":600,"schedule":"30 8 * * *","concurrencyPolicy":"allow"}' \
https://api.northflank.com/v1/projects/{projectId}/jobs/{jobId}/settingsExample response
200 OK
The operation was performed successfully.
JSON
{
"data": {}
}