After you create the scheduled task (choose any time to run when first
setting it up, like run at logon), it will then ask you if you want to go
into the advanced options, check the box and click finish. Once in the
advanced options you can choose idle under the schedule tab. Set it to idle
and the timeout you want.
(FYI - you can get into the advanced options for a task by right clicking on
it and choose properties)
Once the computer is not used for a minute or so the timer starts. If it
gets to 8 hours the task runs, if the user comes back and just moves the
mouse before the timeout period, then the timer stops and resets to zero and
waits for idle again to start counting again.