Upload and run a job
You need to upload a job to the Job Runner service so that you can then set the contexts and inputs under which the job will execute.
Because Job Runner executes jobs in a sandbox virtual machine, the process environment variable that some packages or libraries use will not run as part of a job uploaded to Job Runner.
|
Before you start
-
Check that you have the currently supported versions of these tools and frameworks as described in DXP CLI - Installation documentation.
-
Be familiar with the uploadJob command.
The current total package size limit for Job Runner is 100 MB.
Steps
Upload job
To upload a job to the DXP:
-
Create a directory in which to store your package.
-
Create your code in the following files:
-
main.js
-
manifest.json
-
-
In the root of your directory, run
npm init
. -
Run
npm install <packagename>
, where<packagename>
is any reported package or dependency needed for your package. -
Upload the entire contents of the directory using the
uploadJob
CLI command.
Run job
To run an uploaded job in the Job Runner Service:
-
Sign into your Squiz DXP organization.
-
Navigate to the Jobs page within Squiz DXP
https://dxp.squiz.cloud/organization/<your_org>/configuration/job-runner/jobs
-
Your newly uploaded job will be in the list of jobs.
-
Click the name of your new job to open the Job executions page.
-
Click Start job to open the Start job dialog box.
-
In the Start job dialog box:
-
Select the
context
in which to run the job. -
Define the values for
inputs
.
-
-
Click Start job to start the job.