Add steps to a job

In this topic, you learn how to add one or more server scripts as steps to a job and define how and in which order these server scripts are executed when the job is triggered.

Prerequisites

Procedure

  1. Navigate to the Steps tab.

  2. In the table toolbar, click +Add to add a new server script.

    Result: The Server Script dialog opens.

  3. Go to your server script project, expand the project and click the server script.

    Result: The table adds a row with the details of the server script.

  4. In Error Handling, define the next action in case of a server script error.

    Avoid resulting the job to enter an infinite loop. This can happen by skipping to a script which is at least a step before the current one.
  5. Repeat for each server script you want to include in the job.

  6. Click Save.

To manually trigger the job, click on Run. You can stop the job once the View button appears next to Run.

Results

  • You have added one or more steps to a job.

If you want a script to fail for a specific reason, you can add fail();, which will terminate the script’s execution.