Skip to main content

RestartFailedTasks

This Script is part of the Integrations & Incidents Health Check Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

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#


NameDescription
Script Typepython3
Tags
XSOAR Version6.0.0

Dependencies#


This script uses the following commands and scripts.

  • core-api-post

Inputs#


Argument NameDescription
playbook_exclusionComma Separated list of failed tasks to exclude from restart based on playbook string match
sleep_timeSleep between restarting batch task (seconds)
incident_limitLimit of number of incidents to restart tasks on
group_sizeInteger of how many tasks you want to be restarted at a time (grouping) before a sleep period (as to not overwhelm the system)

Outputs#


PathDescriptionType
RestartedTasks.TotalThe total amount of tasks that were reopenedNumber
RestartedTasks.Task.TaskIDThe ID of the taskString
RestartedTasks.Task.IncidentIDThe ID of the incident of the taskString
RestartedTasks.Task.PlaybookNameThe name of the playbook of the taskString
RestartedTasks.Task.TaskNameThe name of the taskString

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.