--- title: "Create a Job" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/job-scheduling/job/create-job/ description: "This page describes the method to perform operations in the DataStore component." last_updated: 2026-09-09T10:45:38Z service: Job Scheduling type: general related_links: - name: "Catalyst Job Scheduling" url: /en/job-scheduling/ - name: "Jobs" url: /en/job-scheduling/help/job/introduction/ - name: "Java SDK Documentation" url: /en/sdk/java/v1/job-scheduling/jobs/create-job/ - name: "Python SDK Documentation" url: /en/sdk/python/v1/job-scheduling/jobs/create-job/ - name: "REST API Documentation" url: /en/api/code-reference/job-scheduling/job/submit-job/submit-webhook-job/#SubmitWebhookJobByID repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Create a Job > **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/job-scheduling/overview/#prerequisites) to use this SDK method. Using the `submitJob()` SDK method you will be able to create and submit a job to the job pool. You can use this method to create and submit a job to trigger a [Job Function](https://docs.catalyst.zoho.com/en/serverless/help/functions/job-functions/), [Circuit](https://docs.catalyst.zoho.com/en/serverless/help/circuits/introduction/), [AppSail](https://docs.catalyst.zoho.com/en/serverless/help/appsail/introduction/) service, or a Webhook (any third-party URL). The required Job Pool will be referred to using its name. The `jobScheduling` reference used in the code snippets below is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/job-scheduling/create-instance/) created to perform these operations. **Job Function** #### Parameters Used The details of the Job that needs to be created and submitted to the *Function Job Pool* to trigger a Job Function will be passed as a JSON object to the `submitJob()` SDK method. The following table defines the details that need to be provided in the JSON object.
JSON Attributes Definition
`job_name` **Mandatory** parameter. The name to refer to your job.
`jobpool_name` **Mandatory** parameter. The name of the job pool you are submitting your job to.
`target_type` **Mandatory** parameter. Set the value as **Function** to submit a job to the Function Job Pool to trigger a Job Function.
`target_name` or `target_id` You need to provide either the Name or the ID of the job function that needs to triggered. However, providing both is **optional**.
`params` **Optional** parameter. These are params that you pass to the target function. The required parameters need to be provided as key-value pairs in a JSON.
`job_config`
  • **Optional** parameter. The number of retries and the retry interval can be provided as a JSON key-value pair.
  • `number_of_retries`: The number of retries that need to be attempted.
  • `retry_interval`: The interval in which the retries need to occur.
```javascript // create function job const functionJob = await jobScheduling.JOB.submitJob({ job_name: 'test_job', // set a name for the job jobpool_name: 'test', // set the name of the Function jobpool where the job should be submitted target_type: 'Function', // set the target type as Function for function jobs target_name: 'target_function', // set the target function's name (optional) (either target_id or target_name is mandatory) // target_id: '123467890', // set the target function's ID (optional) (either target_id or target_name is mandatory) params: { arg1: 'test', arg2: 'job' }, // set params to be passed to target function (optional) job_config: { number_of_retries: 2, // set the number of retries retry_interval: 15 * 60 // set the retry interval } // set job config - job retries => 2 retries in 15 mins (optional) }); ``` **Circuits** #### Parameters Used The details of the Job that needs to be created and submitted to the *Circuit Job Pool* to trigger a Circuit will be passed as a JSON object to the `submitJob()` SDK method. The following table defines the details that need to be provided in the JSON object.
JSON Attributes Definition
`job_name` **Mandatory** parameter. The name to refer to your job.
`jobpool_name` **Mandatory** parameter. The name of the job pool you are submitting your job to.
`target_type` **Mandatory** parameter. Set the value as **Circuit** to submit a job to the Circuit Job Pool to trigger a Circuit.
`target_name` or `target_id` You need to provide either the Name or the ID of the Circuit that needs to triggered. However, providing both is **optional**.
`test_cases` **Mandatory** parameter. You need to provide the test cases as a JSON key-value pair.
`job_config`
  • **Optional** parameter. The number of retries and the retry interval can be provided as a JSON key-value pair.
  • `number_of_retries`: The number of retries that need to be attempted.
  • `retry_interval`: The interval in which the retries need to occur.
```javascript // create circuit job const circuitJob = await jobScheduling.JOB.submitJob({ job_name: 'test_job', // set a name for the job jobpool_name: 'test', // set the name of the Circuit jobpool where the job should be submitted target_type: 'Circuit', // set the target type as Circuit for circuit jobs target_name: 'target_circuit', // set the target circuit's name (optional) (either target_id or target_name is mandatory) // target_id: '123467890', // set the target circuit's Id (optional) (either target_id or target_name is mandatory) test_cases: { arg1: 'job', arg2: 'test' }, // set the circuit test cases job_config: { number_of_retries: 2, // set the number of retries retry_interval: 15 * 60 // set the retry interval } // set job config - job retries => 2 retries in 15 mins (optional) }); ``` **AppSail Service** #### Parameters Used The details of the Job that needs to be created and submitted to the *AppSail Job Pool* to trigger an AppSail service will be passed as a JSON object to the `submitJob()` SDK method. The following table defines the details that need to be provided in the JSON object.
JSON Attributes Definition
`job_name` **Mandatory** parameter. The name to refer to your job.
`jobpool_name` **Mandatory** parameter. The name of the job pool you are submitting your job to.
`target_type` **Mandatory** parameter. Set the value as **AppSail** to submit a job to the AppSail Job Pool to trigger an AppSail service.
`target_name` or `target_id` You need to provide either the Name or the ID of the AppSail that needs to triggered. However, providing both is **optional**.
`request_method` **Mandatory** parameter. Provide the AppSail request method.
`url` **Mandatory** parameter. Provide the AppSail endpoint.
`params` **Optional** parameter. You can provide query params as JSON key-value pairs.
`headers` **Optional** parameter. You can provide headers as JSON key-value pairs.
`request_body` **Optional** parameter. Provide the request body.
`job_config`
  • **Optional** parameter. The number of retries and the retry interval can be provided as a JSON key-value pair.
  • `number_of_retries`: The number of retries that need to be attempted.
  • `retry_interval`: The interval in which the retries need to occur.
```javascript // create appsail job const appsailJob = await jobScheduling.JOB.submitJob({ job_name: 'test_job', // set a name for the job jobpool_name: 'test', // set the name of the AppSail jobpool where the job should be submitted target_type: 'AppSail', // set the target type as AppSail for appsail jobs target_name: 'target_appsail', // set the target appsail's name (optional) (either target_id or target_name is mandatory) // target_id: '123467890', // set the target appsail's ID (optional) (either target_id or target_name is mandatory) request_method: 'POST', // set the appsail request's method url: '/test', // set the appsail's URL path (optional) params: { arg1: 'test', arg2: 'job' }, // set the appsail request's query params (optional) headers: { IS_TEST_REQUEST: 'true' }, // set the appsail request's headers (optional) request_body: 'test_request', // set the appsail request's body (optional) job_config: { number_of_retries: 2, // set the number of retries retry_interval: 15 * 60 // set the retry interval } // set job config - job retries => 2 retries in 15 mins (optional) }); ``` **Webhook** #### Parameters Used The details of the Job that needs to be created and submitted to the *Webhook Job Pool* to trigger any URL will be passed as a JSON object to the `submitJob()` SDK method. The following table defines the details that need to be provided in the JSON object.
JSON Attributes Definition
`job_name` **Mandatory** parameter. The name to refer to your job.
`jobpool_name` **Mandatory** parameter. The name of the job pool you are submitting your job to.
`target_type` **Mandatory** parameter. Set the value as **Webhook** to submit a job to the Webhook Job Pool to trigger the required URL.
`request_method` **Mandatory** parameter. Provide the required request method.
`url` **Mandatory** parameter. Provide the webhook's request URL.
`params` **Optional** parameter. You can provide query params as JSON key-value pairs.
`headers` **Optional** parameter. You can provide headers as JSON key-value pairs.
`request_body` **Optional** parameter. Provide the webhook's request body.
`job_config`
  • **Optional** parameter. The number of retries and the retry interval can be provided as a JSON key-value pair.
  • `number_of_retries`: The number of retries that need to be attempted.
  • `retry_interval`: The interval in which the retries need to occur.
```javascript // create webhook job const webhookJob = await jobScheduling.JOB.submitJob({ job_name: 'test_job', // set a name for the job jobpool_name: 'test', // set the name of the Webhook jobpool where the job should be submitted target_type: 'Webhook', // set the target type as Webhook for webhook jobs request_method: 'POST', // set the webhook request's method url: 'https://catalyst.zoho.com', // set the webhook request's URL params: { arg1: 'test', arg2: 'job' }, // set the webhook request's query params (optional) headers: { IS_TEST_REQUEST: 'true' }, // set the webhook request's headers (optional) request_body: 'test_request', // set the webhook request's body (optional) job_config: { number_of_retries: 2, // set the number of retries retry_interval: 15 * 60 // set the retry interval } // set job config - job retries => 2 retries in 15 mins (optional) }); ```