Submit Cron Instantly
Description
This API enables you to submit a cron that will instantly submit a job to the job pool to trigger a target type endpoint.
Note:
-
This API is ideally used to test if the configured cron is functioning as configured.
-
In this API, we are illustrating the sample request and sample response with a Job Function. The API functionality remains the same for webhook, Circuits, and AppSail jobs.
-
This API is applicable for Pre-Defined Crons and Dynamic Crons.
Request Details
Request URL
{app_domain}/baas/v1/project/{project_id}/job_scheduling/cron/{cron_id}/submit_job
Request Headers
Authorization: Zoho-oauthtoken {oauth_token}
Optional Headers
CATALYST-ORG: {org_id}
Environment: Development
Scope
ZohoCatalyst.cron.CREATE
Response Details
The JSON response returns the metadata of the submitted cron. The response will also contain the details of the user who submitted the cron.
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/10278000000019013/job_scheduling/cron/10108000003822189/submit_immediately
-H “Authorization: Zoho-oauthtoken 1000.91016.2f57”
{
"status": "success",
"data": {
"job_id": "10108000004251242",
"created_time": "Jun 07, 2024 10:32 AM",
"response_code": null,
"start_time": {},
"end_time": {},
"submitted_on": {
"startTimeToRedirectLogsPage": "07/06/2024 10:27",
"timeWithGivenTimezone": "Jun 07, 2024 10:32 AM IST",
"timeWithJobTimezone": "Jun 07, 2024 10:32 AM IST"
},
"job_status": "PENDING",
"capacity": {
"memory": "256"
},
"job_meta_details": {
"id": "10108000003822191",
"url": "",
"job_name": "delayJob",
"job_config": {
"number_of_retries": 0
},
"target_type": "Function",
"target_details": {
"id": "10108000003822071",
"target_name": "fn"
},
"source_type": "Cron",
"source_details": {
"id": "10108000003822189",
"source_name": "check2",
"details": {
"cron_execution_type": "pre-defined"
}
},
"jobpool_id": "10108000003822066",
"headers": {},
"params": {}
},
"retried_count": null,
"parent_job_id": "10108000004251242",
"execution_time": null,
"cron_circuit_id": null,
"circuit_execution": null,
"status": false
}
}
Yes
No
Send your feedback to us