From 9199debf282fb10225d6d8e06686631a09463109 Mon Sep 17 00:00:00 2001 From: Phil Bruckner Date: Wed, 22 Jul 2020 08:55:31 -0500 Subject: [PATCH] Explain what happens to calling script when called script has errors (#14059) --- source/_integrations/script.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/_integrations/script.markdown b/source/_integrations/script.markdown index 9f7dbe592e4..e74ae03f9ef 100644 --- a/source/_integrations/script.markdown +++ b/source/_integrations/script.markdown @@ -203,14 +203,17 @@ script: ### Waiting for Script to Complete When calling a script "directly" (e.g., `script.NAME`) the calling script will wait for the called script to finish. +If any errors occur that cause the called script to abort, the calling script will be aborted as well. When calling a script (or multiple scripts) via the `script.turn_on` service the calling script does _not_ wait. It starts the scripts, in the order listed, and continues as soon as the last script is started. +Any errors that occur in the called scripts that cause them to abort will _not_ affect the calling script.

Following is an example of the calling script not waiting. It performs some other operations while the called script runs "in the background." Then it later waits for the called script to complete via a `wait_template`. +This technique can also be used for the calling script to wait for the called script, but _not_ be aborted if the called script aborts due to errors. {% raw %} ```yaml