The subject behavior can occur if the Terminal Services service is disabled, which causes the Task Scheduler service to use a different token and erroneously reuse a closed handle.

To workaround this issue, set the start up value for the Terminal Services service to Manual:

1. Open a CMD.EXE window.

2. Type the following command and press Enter:

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\TermService /V Start /T REG_DWORD /F /D 3