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. Go to the Steps tab.

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

    Result: The Server Script dialog opens.

  3. Go to your server script project, expand the project and select 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. Select Save.

To manually trigger the job, select 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.