We have a scheduled task that sometimes hangs. It just stops responding. On Windows 2003, we had task scheduler configured to kill the task after 3 hours. It's a 32-bit process.
On Windows 2008 R2, we've set "Stop the task if it runs longer than" and "If the running task does not end when requested, force it to stop".
However, when the task hangs, it is never stopped, and stays in process explorer for days.
Any clue why Windows Scheduler would not kill a process?
(This post has a reproducible setup for this issue.)
Best Answer
The answer is that the 64-bit task scheduler will not actually kill a 32-bit task.
We solved this by running
pskill
as action 1 of the scheduled task.pskill
has no problem dispatching a 32-bit processes.