commands – job url
Set the URL for a Webhook job to call, or the database URL of a SQL job.
Usage
job url name (get|post|json|sql)? URL
where
name | of job whose url to set. |
get | call URL using a HTTP GET command, appending any parameter properties as parameters to the URL. Webhook job. Def |
post | call URL using a HTTP POST command, including any parameter properties within the message message, formatted as name/value pairs. Webhook job. |
json | call URL using a HTTP POST command, including any parameter properties within the message message, formatted as JSON. Webhook job. |
sql | execute the sql defined in input, on the database at URL. SQL job. |
URL | URL to execute. See variables for available variables that can be included. |
If the url host is example.com , or is within the domain .example.com , the job will be sent to the echo URL. |
write on name, and host acl permission on the host and user fields of URL.
Examples
Set a json webhook url
BeyondCron % job url /server1/debug json http://server1/debug.php
BeyondCron % job list full debug
----------- -------------------------------- Name /server1/debug Description Log http request header and message ... URL http://server1/debug.php Method JSON ...
Set a POST webhook url with parameters
If a URL is defined with one or parameters these will be automatically converted to job properties.
BeyondCron % job url /server1/debug post http://server1/debug.php?hello=world
BeyondCron % job list full debug
----------- -------------------------- Name /server1/debug Description Log http request header and message ... URL http://server1/debug.php Method Post Properties hello: world ...
Set a GET webhook url including variables
BeyondCron % job url /server1/debug get \
http://server1/debug.php?yesterday={{ time -1d EEE }}
BeyondCron % job list full debug
----------- -------------------------- Name /server1/debug Description Log http request header and message ... URL http://server1/debug.php Method Get Properties yesterday: {{ time -1d EEE }} ...
Set a sql job url including authentication properties
BeyondCron % job url /examples/sql/select sql \
jdbc:postgresql://localhost:5433/beyondcron?user=beyondcron&password=Secret!
BeyondCron % * job list full select*
----------- -------------------------------------------- Name /examples/sql/select Description Select from job status table ... URL jdbc:postgresql://localhost:5433/beyondcron ... Properties Type Name Value ---------------- --------- ------------- secret parameter password Secret! parameter user beyondcron ...
See also
- host acl
- job add
- job calendar
- job changes
- job command
- job condition
- job copy
- job delay
- job delete
- job description
- job diff
- job email
- job enable/disable/bypass
- job history
- job host
- job image
- job input
- job list
- job message
- job output
- job property
- job schedule
- job show
- job sql
- job start/kill
- job status
- job subject
- job variables
- job timezone
- job trigger
- job user
- job variables