Update job settings | Jobs | Northflank API docs
v1
Double column
API
CLI
JS Client

Jobs /

Update job settings

Updates settings for the job

Required permission

Project > Jobs > General > Update

Path parameters

    • projectId

      string required

      ID of the project

    • jobId

      string required

      ID of the job

Request body

  • {object}
    • backoffLimit

      integer

      The number of attempts to rerun a job before it is marked as failed.

    • runOnSourceChange

      string

      Configure when the job should be run if the source image changes.

      one of
      never, cd-promote, always
    • activeDeadlineSeconds

      integer

      The maximum amount of time, in seconds, for a job to run before it is marked as failed.

      min
      1
    • schedule

      string

      The 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

      string

      Whether 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 of
      allow, forbid, replace

Response body

  • {object}

    Response object.

    • data

      {object} required

      Result 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}/settings

    Example response

    200 OK

    The operation was performed successfully.

    JSON

    {
      "data": {}
    }

    © 2024 Northflank Ltd. All rights reserved.