From d85f68cf6c240928b39ac4f2fb7dcf58156a7eb5 Mon Sep 17 00:00:00 2001 From: Charles Crossan Date: Thu, 2 Jan 2020 12:34:17 -0500 Subject: [PATCH] Update Documentation for win_scheduled_task.py (#66079) Passing an empty string through this parameter is not gracefully handled by the module implementation, so adjust the documentation to only include the `PT0S` method of specifying unbounded `execution_time_limit`. The win_scheduled_task execution_time_limit must be set explicitly to an empty string to permit unbounded execution time. A newly created task without a value for `TaskSettings.ExecutionTimeLimit` will default to 72 hours (https://docs.microsoft.com/en-us/windows/win32/taskschd/tasksettings-executiontimelimit) even if you omit the Ansible task parameter `execution_time_limit`. --- lib/ansible/modules/windows/win_scheduled_task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/windows/win_scheduled_task.py b/lib/ansible/modules/windows/win_scheduled_task.py index b30dc638ce1..6e64738451a 100644 --- a/lib/ansible/modules/windows/win_scheduled_task.py +++ b/lib/ansible/modules/windows/win_scheduled_task.py @@ -353,7 +353,8 @@ options: execution_time_limit: description: - The amount of time allowed to complete the task. - - When not set, the time limit is infinite. + - When set to `PT0S`, the time limit is infinite. + - When omitted, the default time limit is 72 hours. - This is in the ISO 8601 Duration format C(P[n]Y[n]M[n]DT[n]H[n]M[n]S). type: str version_added: '2.5'