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.