Update a Cron Job
Update a cron job.
Method
Endpoint
Example API call
Example Success Response
Together with the HTTP code 200
, the following content will be responded:
Example Failure Response
Together with the HTTP code of the error, the following error message will be responded:
JSON Parameters in Request Body
name | type | description | limits |
---|---|---|---|
url | string | URL to call. | Maximum 1024 chars |
cron_expression | string | Cron expression following these syntax. | Maximum 1000 chars |
http_auth_user | string | HTTP basic authentication user. | Maximum 100 chars |
http_auth_pw | string | HTTP basic authentication password. | Maximum 100 chars |
timezone_from | int | Specify the source of timezone used to calculate the executing times of the cron job. Allowed values:
| |
timezone | int | Timezone used to calculate executing times when timezone_from = 2 .Allowed values: TZ Timezones. | |
http_method | string | HTTP method used in the HTTP requests to your cron job script. Allowed values: GET , POST , HEAD , PUT , PATCH , DELETE , CONNECT , OPTIONS and TRACE . | |
http_headers | string | HTTP headers sent with the HTTP requests to your cron job script. | Maximum 10240 chars |
http_message_body | string | HTTP message body sent with the HTTP requests to your cron job script if the HTTP method is POST, PUT or PATCH. It contains variable-value pairs or JSON payload. E.g. param1=val1¶m2=val2 or {"name":"John","age":30} . | Maximum 10240 chars |
timeout | int | The max allowed execution time (in seconds) of your cron job. Execeeding this time, your cron job will time out and be marked as “failed”. Allowed values:
| |
success_criterion | int | Rules for considering if the execution of a cron job succeeded or failed. Allowed values:
| |
success_regexp | string | The regular expression to match when success_criterion is set to 2 . | Maximum 255 chars |
failure_regexp | string | The regular expression to match when success_criterion is set to 3 . | Maximum 255 chars |
send_email | int | Email notification setting of the cron job. Allowed values:
| |
email_threshold | int | Only after encountering this amount of failures, the failure notification email will get sent. Allowed values: 1 to 5 . | |
send_slack | int | Slack notification setting of the cron job. Allowed values:
| |
slack_sensitivity | int | Only after encountering this amount of failures, the failure Slack notification will get sent. Allowed values: 1 to 5 . | |
slack_url | string | URL that the Slack notification is sent to. | Maximum 1024 chars |
send_webhook | int | Webhook notification setting of the cron job. Allowed values:
| |
webhook_url | string | URL that the webhook request is sent to. | Maximum 1024 chars |
webhook_http_method | string | HTTP method that your cron job webhook requests will use. Allowed values: GET , POST , HEAD , PUT , PATCH , DELETE , CONNECT , OPTIONS and TRACE . | |
webhook_data | string array | Information that your cron job webhook requests will send. Valid values include CRON_JOB_ID , CRON_JOB_NAME , CRON_JOB_URL , CRON_JOB_HTTP_STATUS_CODE , CRON_JOB_EXECUTION_STATUS and CRON_JOB_EXECUTION_ERROR . E.g. ["CRON_JOB_ID","CRON_JOB_NAME"] | |
status | int | Status of the cron job. Allowed values:
| |
cron_job_name | string | Name of the cron job. | Maximum 100 chars |
description | string | Description of the cron job. | Maximum 1024 chars |
cron_job_group_id | int | Group ID of the cron job. You could find the group ID in the group pages. If this parameter is set to 0 , the cron job doesn’t belong to any group. |