Hello @Hyuck Jun Ko ,
Thank you for the detailed and well-isolated report. I reproduced the behavior you describe and reviewed the relevant Microsoft documentation. Below is what I found.
I reproduced the behavior by running the same sequence you did (Windows PowerShell 5.1, Schedule.Service COM API, elevated) on Windows 11 build 10.0.26200, which shares the Task Scheduler service codebase with Windows Server 2022. I tested four paths:
-
RegisterTaskDefinitionwithTASK_CREATE(2): new disabled task, no triggers, harmlesscmd.exe /c exit 0action -
RegisterTaskDefinitionwithTASK_UPDATE(4) on that task -
RegisterTaskwith raw XML containing<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine> - Same as (1) but with a daily
CalendarTriggerrepeating every 5 minutes for 2 hours (PT5M/PT2H), matching your production task shape
In every case the in-memory TaskDefinition and its XmlText showed false before registration, all calls returned S_OK, and both the returned IRegisteredTask and a fresh GetTask readback showed UseUnifiedSchedulingEngine = true in the effective setting and the stored XML. So this is not specific to build 20348.5622, not caused by the update path, flags, or trigger configuration, and not something in your code. The service rewrites the value to true on registration.
Below are my answers to your three questions.
Regarding whether changing false to true is an expected or known registration behavior on this build: it is consistent behavior of the Task Scheduler service on current Windows builds (I observed identical results on Windows 11), so it is not a regression unique to your build. However, I could not find it documented anywhere:
- UseUnifiedSchedulingEngine (settingsType) Element still states the default is
false. - ITaskSettings2::UseUnifiedSchedulingEngine describes it as read/write with no remarks about it being overridden.
- MS-TSCH 3.2.5.4.2 SchRpcRegisterTask only describes the server modifying the
Principalnode of the submitted XML; it does not describe alteringSettings. - MS-TSCH Appendix B: Product Behavior has no note about this setting.
I therefore cannot point you to an official statement that it is by design; it is undocumented behavior as far as the public docs go.
Regarding which setting or condition controls it: none that is exposed. I did not find any task setting, registration flag, registry value, or Group Policy that preserves false. The service applies true unconditionally regardless of TASK_CREATE/TASK_UPDATE, COM vs. XML registration, or trigger content.
Regarding whether there is a supported way to register and retain false: not on current builds. The unified scheduling engine is effectively the only engine in use on Windows 10 / Server 2016 and later.
I would also like to address your production task (daily CalendarTrigger, repeat every 5 minutes for 2 hours). If the concern comes from the What's New in Task Scheduler page, which lists "Repetition patterns for calendar triggers" among features the unified engine did not support, please note that list applies to Windows 7 / Server 2008 R2. The Windows 8 section of the same page documents that the unified engine was extended, and in my test (4) a daily trigger with Repetition.Interval = PT5M, Repetition.Duration = PT2H registered normally with the unified engine. You should be able to re-enable that task safely. If you see any scheduling anomaly after enabling it, check the Microsoft-Windows-TaskScheduler/Operational log for the specific trigger/launch events and share the details with me.
Since this is a community forum, my scope here is limited to public documentation and what I can reproduce myself. I don't have access to the Task Scheduler service internals or the product group's design decisions, so I can't confirm whether this behavior is intentional or give you an official statement on it. If you need an authoritative ruling, a Microsoft Support case is the right route, as that goes through a channel that can reach the product team directly. Go to https://support.microsoft.com/contactus, sign in, and select Server products; you will be redirected to the Microsoft Engage Center, where you can create a support request for Windows Server. Include the build number, your test script, and the before/after XML. You can also use the Feedback control on the right side of the document, just below the In** this **article section, to report the stale default="false" statement so the documentation can be updated.
Hope these information help! If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.
Thank you.