Python
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.text)
{ "resource": "datasource:ratings-db", "triggers": [ { "type": "cron", "enabled": true, "expression": "0 15 10 ? * MON-FRI" } ] }
Configure the schedule for the specified job.
The job ID.
Validate that the job config exists.
JSON-formatted configuration values.
Resource reference as a string, such as 'datasource:ratings-db'
successful operation
Show child attributes
interval
cron
job
The date and time at which the job will first run (ISO-8601 format). Applies to type 'interval'.
The date and time at which the job will run last (ISO-8601 format). Applies to type 'interval'.
The interval at which the job will run. Applies to type 'interval'.
The unit for the interval. Applies to type 'interval'.
minute
hour
day
A cron string that defines the schedule. Applies to type 'cron'.
The ID of the job that triggers this one. Applies to type 'job'.
Run this job when the triggering job succeeds. Applies to type 'job'.
Run this job when the triggering job fails. Applies to type 'job'.
Run this job when the triggering job is aborted. Applies to type 'job'.
Was this page helpful?