To improve Windows Server I suggest you ...

Bug: Task Scheduler CalendarTrigger Repetition not working in Server 2016TP5

Scheduled tasks on the current TP5 of Windows Server 2016, which have a CalendarTrigger with repetition configured, don't seem to trigger and cannot be started manually.
The same trigger without repetition (e.g. after unchecking the "Repeat task every:" checkbox in taskschd.msc) works correctly.
A TimeTrigger with the same repetition configuration works, too.
taskschd.msc calculates and displays the next runtime correctly.

When I try to start such a task manually in taskschd.msc, a message box appears (running any other task works):
de-DE: "Der Aufgabenplanungsdienst ist nicht verfügbar. Die Aufgabenplanung wird erneut versuchen, eine Verbindung herzustellen."
en-US: "Task Scheduler service is not available. Task Scheduler will attempt to reconnect to it."

When I try to start the task by using Start-ScheduledTask, a non-terminating exception is thrown ("Nicht implementiert"="Not Implemented"):
PS C:\Users\Administrator> Start-ScheduledTask -TaskName bad
Start-ScheduledTask : Nicht implementiert
In Zeile:1 Zeichen:1
+ Start-ScheduledTask -TaskName bad
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (PS_ScheduledTask:Root/Microsoft/...S_ScheduledTask) [Start-ScheduledTask]
, CimException
+ FullyQualifiedErrorId : HRESULT 0x80004001,Start-ScheduledTask

When I try to start it via schtasks.exe, the same message appears:
C:\Users\Administrator>schtasks /run /tn bad
FEHLER: Nicht implementiert

When the task should trigger by time, there are no events in Microsoft-Windows-TaskScheduler/Operational indicating any activity around this task.

The tasks trigger sections look like this:
working (without repetition):
<Triggers>
<CalendarTrigger>
<StartBoundary>2016-06-14T00:13:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
not working (with hourly repetion):
<Triggers>
<CalendarTrigger>
<Repetition>
<Interval>PT1H</Interval>
<Duration>P1D</Duration>
<StopAtDurationEnd>false</StopAtDurationEnd>
</Repetition>
<StartBoundary>2016-06-14T00:13:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>

On Windows Server 2012R2 this task works perfectly fine.

Test environment (in case it matters):
Hyper-V Generation 2 VMs on Windows Server 2012R2
Windows Server 2016 Technical Preview 5 Standard with GUI German (installed from de_windows_server_2016_technical_preview_5_x64_dvd_8512319.iso, SHA1 20B276A6EF63AB46FF50A561CD16B48FDF8787AE)
3 VMs, 2 of them fresh installs without any modification except the task

The whole task:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2016-06-14T10:20:18.9077118</Date>
<Author>WIN-B5GC2VET9K1\Administrator</Author>
<URI>\Test</URI>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<Repetition>
<Interval>PT1H</Interval>
<Duration>P1D</Duration>
<StopAtDurationEnd>false</StopAtDurationEnd>
</Repetition>
<StartBoundary>2016-06-14T00:13:00</StartBoundary>
<Enabled>true</Enabled>
<ScheduleByDay>
<DaysInterval>1</DaysInterval>
</ScheduleByDay>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-18</UserId>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>true</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
<UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\temp\test.bat</Command>
</Exec>
</Actions>
</Task>

10 votes
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Stefan Eichenseer shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base