data – job properties
Name | Value | Count | |
---|---|---|---|
name | path | 1 | Job path name. |
description | string | 0/1 | Optional description. |
type | COMMAND CONTAINER CUSTOM SQL TRIGGER URL |
1 | Job type. |
mode | ENABLED DISABLED BYPASS |
1 | Job mode. |
calendar | path | 0/1 | Optional job calendar. |
timezone | timezone | 1 | Timezone of job. |
events | event | 0+ | Optional job events.TRIGGER events are not supported when there are one or more schedules. |
schedules | schedule | 0+ | Optional job schedules. |
properties | property | 0+ | Optional job properties. |
output | path | 0/1 | Optional job output file. |
additional COMMAND job properties | |||
user | word | 1 | Name of user to run command as. |
host | word | 1 | Name of host/server to run command on. |
command | string | 1 | Command and arguments to execute. |
input | string | 0+ | Optional command input. |
additional CONTAINER job properties | |||
user | word | 0/1 | Name of user to run command as. If running a container job on Kuberbetes, this value will be ignored. |
command | string | 1 | Command and arguments to execute. |
image | string | 1 | Container image name. |
additional EMAIL job properties | |||
recipient | word | 1 | Address to send email to. |
subject | string | 1 | Subject of email. |
message | string | 0/1 | Body of email. |
additional SQL job properties | |||
url | url | 1 | JDBC URL of database to execute SQL on. |
sql | string | 1+ | SQL command/s to execute. |
additional TRIGGER job properties | |||
delay | period | 1 | Length of delay/runtime. |
additional URL job properties | |||
url | url | 1 | URL to call. |
method | GET POST PUT PATCH DELETE |
0/1 | Default = GET . |
content | string | 0+ | Optional content to pass to the URL. |
if the name, calendar property values start with …, they will be replaced by import command root parameter.
Examples
Minimal command job
{ "name": "/examples/minimal/command", "type": "COMMAND", "mode": "ENABLED", "timezone": "Australia/Melbourne", "user": "nobody", "host": "localhost", "command": "/usr/bn/touch /tmp/nobody-was-here" }
name: /examples/minimal/command type: COMMAND mode: ENABLED timezone: Australia/Melbourne user: nobody host: localhost command: /usr/bin/touch /tmp/nobody-was-here
Minimal url job
{ "name": "/examples/minimal/url", "type": "URL", "mode": "ENABLED", "timezone": "Australia/Melbourne", "url": "http://example.com/echo" }
name: /examples/minimal/url type: URL mode: ENABLED timezone: Australia/Melbourne url: 'http://example.com/echo' method: JSON
Scheduled job
{ "name": "/example/minimal/scheduled", "mode": "ENABLED", "description": "Scheduled job description", "type": "COMMAND", "calendar": "/example/minimal/weekdays", "timezone": "Australia/Melbourne", "schedules": [{ "type": "DAILY", "time": "09:00:00" }], "properties": [ { "name": "beyond", "value": "cron" } ], "user": "nobody", "host": "localhost", "command": "/usr/bin/touch /tmp/scheduled-job-was-here" }
name: /example/minimal/scheduled description: Scheduled job description type: COMMAND mode: ENABLED calendar: /example/minimal/weekdays timezone: Australia/Melbourne schedules: - type: DAILY time: 09:00:00 properties: - name: beyond value: cron user: nobody host: localhost command: /usr/bin/touch /tmp/scheduled-job-was-here
Triggered job
{ "name": "/example/minimal/triggered", "mode": "ENABLED", "description": "Triggered job description", "type": "COMMAND", "timezone": "Australia/Melbourne", "events": [{ "type": "TRIGGER", "job": "/examples/minimal/command", }], "user": "nobody", "host": "localhost", "command": "/usr/bin/touch /tmp/triggered-job-was-here" }
name: /example/minimal/scheduled description: Scheduled job description type: COMMAND mode: ENABLED timezone: Australia/Melbourne events: - type: TRIGGER job: /examples/minimal/command user: nobody host: localhost command: /usr/bin/touch /tmp/scheduled-job-was-here