Windows Server 2025: Task Scheduler "Stop the task if it runs longer than" fails to kill legacy 32-bit GUI applications (Session 0 Isolation issue?)

pyeonghwa jang 0 Reputation points
2026-08-26T03:15:10.0733333+00:00

Hello Microsoft,

We are currently migrating our infrastructure to Windows Server 2025, and we are facing a persistent issue with the Windows Task Scheduler.

We have a legacy 32-bit terminal emulation/communication program (developed around 2015, running with arguments like EzComm.exe "Session#1.ecf" and utilizing a specific 'Start in' working directory).

The Problem:

When the task is triggered, the program launches successfully. However, when the Task Scheduler's built-in stop conditions are met—specifically:

"Stop the task if it runs longer than X hours"

"If the running task does not end when requested, force it to stop"

...the Task Scheduler fails to terminate the application. The process remains hung in the background indefinitely, and the Task Scheduler status stays stuck in "Running" unless we manually kill it via taskkill /f.

What we have observed & tested:

This exact scheduler setup worked fine on older Windows Server versions, but breaks on Server 2019/2025 updates.

It seems like the OS's enhanced security policies (such as Session 0 Isolation or IPC restrictions on background services) are blocking the Task Scheduler's graceful shutdown/termination signals from reaching legacy 32-bit GUI apps that require a working directory and arguments.

We know we can use workarounds like a wrapper script with taskkill, but we want to know the native / intended behavior of the Task Scheduler here.

Questions:

Is there a known compatibility issue or design change in Windows Server 2025 where Task Scheduler stop conditions cannot terminate legacy 32-bit apps running with working directories/arguments?

Are there any official group policies, registry keys, or security settings that allow Task Sc

Windows for business | Windows Server | User experience | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Hoang Le 3,935 Reputation points Independent Advisor
    2026-08-26T04:08:14.86+00:00

    Hello pyeonghwa jang,

    On Windows Server 2019 and 2025 there was a design change in how Task Scheduler interacts with user‑mode processes, especially legacy 32‑bit GUI applications. The stop conditions you mention rely on the scheduler sending a termination signal to the process handle, but due to Session 0 isolation and stricter job object handling, those signals no longer reach applications that depend on interactive desktop contexts or legacy IPC. That is why the task remains stuck in “Running” and the process does not terminate unless you force it with taskkill /f.

    There are no group policies or registry keys to revert this behavior; Microsoft’s intended model is that non‑service applications should be wrapped in scripts or controlled via job objects that respond to termination. The official workaround is to configure the scheduled task to call a wrapper script that launches the legacy program and enforces termination with Stop-Process or taskkill when the scheduler stop condition is met. This is the only supported way to guarantee cleanup in Server 2019/2025. If you want to confirm the compatibility issue, you can test with a modern 64‑bit console app—Task Scheduler will terminate it correctly, which shows the difference is tied to how legacy 32‑bit GUI apps handle termination signals under the newer OS security model.

    If my answer is useful for you, please hit Accept the answer to support me.

    Thank you,

    HL.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.