RestartFailedTasks
Use this Script to re-run failed tasks. Run in the same incident after running `GetFailedTasks` for restarting all of the failed tasks or some of them.
Details
| ID | RestartFailedTasks |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
README
Use this Script to re-run failed tasks. Run in the same incident after running GetFailedTasks for restarting all of the failed tasks or some of them.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | |
| XSOAR Version | 6.0.0 |
Dependencies
This script uses the following commands and scripts.
- core-api-post
Inputs
| Argument Name | Description |
|---|---|
| playbook_exclusion | Comma Separated list of failed tasks to exclude from restart based on playbook string match |
| sleep_time | Sleep between restarting batch task (seconds) |
| incident_limit | Limit of number of incidents to restart tasks on |
| group_size | Integer of how many tasks you want to be restarted at a time (grouping) before a sleep period (as to not overwhelm the system) |
Outputs
| Path | Description | Type |
|---|---|---|
| RestartedTasks.Total | The total amount of tasks that were reopened | Number |
| RestartedTasks.Task.TaskID | The ID of the task | String |
| RestartedTasks.Task.IncidentID | The ID of the incident of the task | String |
| RestartedTasks.Task.PlaybookName | The name of the playbook of the task | String |
| RestartedTasks.Task.TaskName | The name of the task | String |
Troubleshooting
Multi-tenant environments should be configured with the Cortex Rest API instance when using this
automation. Make sure the Use tenant parameter (in the Cortex Rest API integration) is checked
to ensure that API calls are made to the current tenant instead of the master tenant.
args: - defaultValue: Job description: Comma Separated list of failed tasks to exclude from restart based on playbook string match. name: playbook_exclusion - defaultValue: '10' description: Sleep between restarting batch task (seconds). name: sleep_time - defaultValue: '100' description: Limit of number of incidents to restart tasks on. name: incident_limit - defaultValue: '10' description: Integer of how many tasks you want to be restarted at a time (grouping) before a sleep period (as to not overwhelm the system). name: group_size comment: Use this Script to re-run failed tasks. Run in the same incident after running `GetFailedTasks` for restarting all of the failed tasks or some of them. commonfields: id: RestartFailedTasks version: -1 enabled: true name: RestartFailedTasks outputs: - contextPath: RestartedTasks.Total description: The total amount of tasks that were reopened. type: Number - contextPath: RestartedTasks.Task.TaskID description: The ID of the task. type: String - contextPath: RestartedTasks.Task.IncidentID description: The ID of the incident of the task. type: String - contextPath: RestartedTasks.Task.PlaybookName description: The name of the playbook of the task. type: String - contextPath: RestartedTasks.Task.TaskName description: The name of the task. type: String script: '-' subtype: python3 timeout: 1.2µs type: python dockerimage: demisto/python3:3.12.13.10116658 tests: - No tests (auto formatted) dependson: must: - core-api-post fromversion: 6.0.0