Difference between revisions of "Documentation/Scheduling/Managing Batch Schedule Jobs"
From ScriptRunner
(Created page with " Documentation :: Scheduling :: Managing Batch Schedule Jobs Batch Schedule Jobs define the actual scripts that are run as part of a Batch Schedule. They store both the arg...") |
m |
||
| Line 21: | Line 21: | ||
**'''Host''': (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected. | **'''Host''': (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected. | ||
**'''Batch Schedule''': Set the Batch Schedule that this job will run under. | **'''Batch Schedule''': Set the Batch Schedule that this job will run under. | ||
| − | **'''Predecessors''': (Optional) If you do not want this job to run before others have completed, this is where to set it. Click [[File: | + | **'''Predecessors''': (Optional) If you do not want this job to run before others have completed, this is where to set it. Click [[File: editButton.png]] to show the Predecessors window.<br /><br />[[File: predecessors.png]]<br /><br />Click the [[File: add.png | 100px]] button to add more than one job if needed. Tick the Allow Failures box to allow the job you are creating to run, even if the selected previous job reports a failure after running. |
**'''Job Arguments''': This area will display inputs for the arguments needed to run the script selected. | **'''Job Arguments''': This area will display inputs for the arguments needed to run the script selected. | ||
| Line 46: | Line 46: | ||
**'''Host''': (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected. | **'''Host''': (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected. | ||
**'''Batch Schedule''': Set the Batch Schedule that this job will run under. | **'''Batch Schedule''': Set the Batch Schedule that this job will run under. | ||
| − | **'''Predecessors''': (Optional) If you do not want this job to run before others have completed, this is where to set it. Click [[File: | + | **'''Predecessors''': (Optional) If you do not want this job to run before others have completed, this is where to set it. Click [[File: editButton.png]] to show the Predecessors window.<br /><br />[[File: predecessors.png]]<br /><br />Click the [[File: add.png | 100px]] button to add more than one job if needed. Tick the Allow Failures box to allow the job you are creating to run, even if the selected previous job reports a failure after running. |
**'''Job Arguments''': This area will display inputs for the arguments needed to run the script selected. | **'''Job Arguments''': This area will display inputs for the arguments needed to run the script selected. | ||
Latest revision as of 21:59, 7 October 2020
Documentation :: Scheduling :: Managing Batch Schedule Jobs
Batch Schedule Jobs define the actual scripts that are run as part of a Batch Schedule. They store both the argument values to be given to the script (if any), and any constraints on running the script, such as waiting for other Batch Schedule Jobs to complete first or to wait for a specific time.
Creating A Batch Schedule Job
- From the menu, select Manage Scheduled > Batch Schedules > Manage Batch Schedule Jobs.
- The Create Batch Schedule Job window should now be diplayed.

- Name: A name to define the job. This will be used elsewhere in ScriptRunner when referring to this job, and also in any alerts should the job fail.
- Description: Space to provide a longer description on what this job is used for, or other documentation.
- Enabled: Tick to allow this job to run at its set schedule. Untick to stop this job from being added to any batch instances. Unticking will not prevent any instances of this job already generated from running.
- Start Time: (Optional) If set, the job will not start until this time after the time given. Used in conjunction with Day Offet.
- Day Offset': If setting a Start Time, this sets the number of days after the job was created that the Start Time given is for. For example, if you have your Batch Schedule set to be generated at 18:00 every day, and wanted a job not to execute before 03:00 the following morning, then this value would be 1. If you wanted a job to not execute before 21:00 that same evening, then this value would be 0.
- Script: Select the script you want this job to run.
- Host: (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected.
- Batch Schedule: Set the Batch Schedule that this job will run under.
- Predecessors: (Optional) If you do not want this job to run before others have completed, this is where to set it. Click
to show the Predecessors window.
Click the
button to add more than one job if needed. Tick the Allow Failures box to allow the job you are creating to run, even if the selected previous job reports a failure after running. - Job Arguments: This area will display inputs for the arguments needed to run the script selected.
- The Batch Schedule Job should now be created, and will be added to the next Batch Instance created from the selected Batch Schedule.
Editing Batch Schedule Jobs
- From the menu, select Manage Scheduled > Batch Schedules > Manage Batch Schedule Jobs.
- Click
against the Batch Schedule Job you wish to update. Use
and
to scroll through pages of groups if needed.
- The Edit Batch Schedule Job should now be shown.

- Name: A name to define the job. This will be used elsewhere in ScriptRunner when referring to this job, and also in any alerts should the job fail.
- Description: Space to provide a longer description on what this job is used for, or other documentation.
- Enabled: Tick to allow this job to run at its set schedule. Untick to stop this job from being added to any batch instances. Unticking will not prevent any instances of this job already generated from running.
- Start Time: (Optional) If set, the job will not start until this time after the time given. Used in conjunction with Day Offet.
- Day Offset': If setting a Start Time, this sets the number of days after the job was created that the Start Time given is for. For example, if you have your Batch Schedule set to be generated at 18:00 every day, and wanted a job not to execute before 03:00 the following morning, then this value would be 1. If you wanted a job to not execute before 21:00 that same evening, then this value would be 0.
- Script: This can not be changed. A new job should be created if you need to run another script.
- Host: (Optional) To override the host the script triggers on, select a Script Host here. If the script itself is set to run on a SSH host, then this host will need to have SSH access to that host for the scheduled to work. SSH hosts themselves can not be selected.
- Batch Schedule: Set the Batch Schedule that this job will run under.
- Predecessors: (Optional) If you do not want this job to run before others have completed, this is where to set it. Click
to show the Predecessors window.
Click the
button to add more than one job if needed. Tick the Allow Failures box to allow the job you are creating to run, even if the selected previous job reports a failure after running. - Job Arguments: This area will display inputs for the arguments needed to run the script selected.
- The Batch Schedule Job should now be saved. Changes will take affect from the next time a Batch Instance is created from the selected Batch Schedule. Existing instances of this job will run as the previous configuration.
Removing Script Groups
Batch Schedule Jobs can only be deleted once all running instances of it have a COMPLETED or CANCELLED status. The job should first be disabled to allow any running instances to complete without any new instances being created.
- From the menu, select Manage Scheduled > Batch Schedules > Manage Batch Schedule Jobs.
- Click
against the Batch Schedule Jobs you wish to remove. Use
and
to scroll through pages of groups if needed.
- The Batch Schedule Job should now be removed and no long visible in the list of Batch Schedule Jobs in Manage Batch Schedule Jobs. Historic instances of it will remain visible in Manage Batch Operations.
