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
-
You have defined the schedule of a job.
-
You have created one or more server scripts you want to include in the job.
Procedure
-
Go to the Steps tab.
-
In the table toolbar, select +Add to add a new server script.
Result: The Server Script dialog opens.
-
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.
-
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. -
Repeat for each server script you want to include in the job.
-
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. |