Open jborean93 opened 4 years ago
This is still a missing feature in that module. Usually you can have triggers and conditions as well. Like daily, but only when computer idle for 10 minutes.
Or is there a solution to that problem yet?
I came across this today as I had a use case for an idle trigger which fired after more than 10 minutes.
I see this isn't implemented as per the TODO entries in the module.
However the larger issue would appear to be the IdleDuration and WaitTimeout which are part of the settings object (IdleSettings) and required for this function appear to be deprecated by M$ suggesting this is no longer possible anyway.
[https://docs.microsoft.com/en-us/windows/win32/taskschd/idlesettings](IdleSettings Documentation)
Can this maybe also achieved by observing a certain event? Tried to find an event that signalizes idle state, couldnt come up with one, only the "logg off" and this is not the same since logoff is only triggered of the idle state.
From @dagwieers on Oct 17, 2018 22:27
SUMMARY
The module does not seem to support idle tasks with a set idle time to execute, the default idle time used seems to be set to 10 minutes.
ISSUE TYPE
COMPONENT NAME
win_scheduled_task
ANSIBLE VERSION
v2.8
OS / ENVIRONMENT
Windows 10 targets
STEPS TO REPRODUCE
In Windows you can create an "idle" action with a specific idle time, e.g. 30 minutes and backoff period.
We need to enforce log off of a local user after 30 mins of idle time on shared public computers.
Related info: https://superuser.com/questions/777488/task-scheduler-what-is-wait-for-idle-for
Copied from original issue: ansible/ansible#47251