Skip to main content
PUT
/
jobs
/
{resource}
/
schedule
Update a job schedule
import requests

url = "https://{FUSION HOST}/api/jobs/{resource}/schedule"

payload = {
    "enabled": True,
    "triggers": [
        {
            "type": "cron",
            "enabled": True,
            "value": "0 */10 * * * *"
        }
    ]
}
headers = {"Content-Type": "*/*"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
{
  "resource": "datasource:ratings-db",
  "triggers": [
    {
      "type": "cron",
      "enabled": true,
      "expression": "0 15 10 ? * MON-FRI"
    }
  ]
}

Path Parameters

resource
string
required

The job ID.

Query Parameters

validate
boolean
default:true

Validate that the job config exists.

Body

*/*

JSON-formatted configuration values.

resource

Resource reference as a string, such as 'datasource:ratings-db'

Response

200 - */*

successful operation

resource

Resource reference as a string, such as 'datasource:ratings-db'

enabled
boolean
triggers
object[]
default
boolean