- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-13-2023 03:37 AM
Dear Members ,
Hoe you are all doing well.
What is the best option to set a timeout for a sub playbook task, so if that playbook run exceed x amount of time it continues to the next task in the playbook.
Thanks.
06-14-2023 01:09 AM
I think you can use execution timeout section.
With this configuration, if the sub playbook task exceeds the specified timeout duration, it will be automatically terminated, and the playbook will continue to the next task.
06-14-2023 01:28 AM
for a task of type sub playbook , its not showing the execution timeout option.
please see the screenshot.
06-21-2023 11:38 PM
any other suggested soliton please ?
06-29-2023 01:12 AM
So I think the first thing I should address here is that you shouldn't do this.
Either the results of the results of the subplaybook are required for the main playbook to continue, or they aren't.
If they are, then doing this is just going to cause the rest of the main playbook to fail.
If they aren't, then there's no clear point in waiting for the subplaybook to complete at all, just run it simultaneously with the rest of the playbook.
Whatever you're trying to do here, it's likely that the downsides of actually implementing this will outweigh the upsides. Something like SLA timers to warn users of excessively long running playbooks so they can manually review seems like a better approach.
That said, this was an interesting technical challenge so I have a solution.
You'll want to create two separate branches: A timeout branch (left) and a subplaybook branch (right). The end of the subplaybook branch should set a key in the context to let us know it's finished. The left branch will then use the built-in "Context Polling - Generic" playbook to finish *either* when the subplaybook finished context key is set OR the context polling timeout is reached (default 10 minutes). Note that the polling mechanism will introduce a delay of up to 1 minute (or more if you set a longer poll time) in the event the subplaybook does actually finish before the timeout.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!