win_update: added extra job parameters to run even if on battery (#28212)
* win_update: added extra job parameters to run even if on battery * added info about battery power change
This commit is contained in:
parent
a42b81132e
commit
46b80bc18e
2 changed files with 4 additions and 1 deletions
|
@ -303,7 +303,7 @@ Function RunAsScheduledJob {
|
|||
Name = $job_name
|
||||
ArgumentList = $job_arg_list
|
||||
ErrorAction = "Stop"
|
||||
ScheduledJobOption = @{ RunElevated=$True }
|
||||
ScheduledJobOption = @{ RunElevated=$True; StartIfOnBatteries=$True; StopIfGoingOnBatteries=$False }
|
||||
}
|
||||
|
||||
if($job_init) { $rsj_args.InitializationScript = $job_init }
|
||||
|
|
|
@ -72,6 +72,9 @@ notes:
|
|||
- C(win_updates) does not manage reboots, but will signal when a reboot is required with the reboot_required return value.
|
||||
- C(win_updates) can take a significant amount of time to complete (hours, in some cases).
|
||||
Performance depends on many factors, including OS version, number of updates, system load, and update server load.
|
||||
- C(win_updates) runs the module as a scheduled task, this task is set to start and continue to run even if the Windows host
|
||||
swaps to battery power. This behaviour was changed from Ansible 2.4, before this the scheduled task would fail to start on
|
||||
battery power.
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
|
Loading…
Reference in a new issue