I want to set a task to run on log on, but only if the time lies in a predefined range, e.g. between 08:00 and 20:00.
Is there a way to do this with task scheduler?
If not, what would be the recommended alternative? Interpose a powershell script and check the time in that?
Background:
I want to set the sound output device (using NirCmd) depending on the time.
The task is triggered at 08:00 and that works, but if I log on at e.g. 09:00, I want it to trigger also then.

