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:

  1. Create a directory in which to store your package.

  2. Create your code in the following files:

    • main.js

    • manifest.json

  3. In the root of your directory, run npm init.

  4. Run npm install <packagename>, where <packagename> is any reported package or dependency needed for your package.

  5. Upload the entire contents of the directory using the uploadJob CLI command.

Run job

To run an uploaded job in the Job Runner Service:

  1. Sign into your Squiz DXP organization.

  2. Navigate to the Jobs page within Squiz DXP

    Home  Configuration  Job runner  Jobs

    https://dxp.squiz.cloud/organization/<your_org>/configuration/job-runner/jobs

    The Jobs page
  3. Your newly uploaded job will be in the list of jobs.

  4. Click the name of your new job to open the Job executions page.

    The Job executions page
  5. Click Start job to open the Start job dialog box.

  6. In the Start job dialog box:

    • Select the context in which to run the job.

    • Define the values for inputs.

      The Start job modal
  7. Click Start job to start the job.