A
aspolivka
Guest
I have a strange issue with the Windows 2008 task scheduler. Under circumstances unknown, it appears to be triggering two instances of a scheduled task for no apparent reason. The 2<sup>nd</sup> triggered instance fails with an error code 2147750687, which is a “duplicate task already running” message. So, there is no apparent user impact, since we have these tasks configured to NOT allow multiple instances.
I can see nothing in task scheduler, or in the specific task that would account for the task being triggered twice. Here is an example of the task in question:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Description>100000;VMS Reports</Description>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2009-04-28T01:30:00</StartBoundary>
<EndBoundary>9999-12-31T23:59:59.999</EndBoundary>
<Enabled>true</Enabled>
<ScheduleByWeek>
<DaysOfWeek>
<Monday />
<Tuesday />
<Wednesday />
<Thursday />
<Friday />
<Saturday />
</DaysOfWeek>
<WeeksInterval>1</WeeksInterval>
</ScheduleByWeek>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>INT\bebprdnuts</UserId>
<LogonType>Password</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<IdleSettings>
<Duration>PT10M</Duration>
<WaitTimeout>PT1H</WaitTimeout>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>E:\beb\Newt\bin\jobstub.exe</Command>
<Arguments>/inst_id:41782F0EA57247BFA811921449F51BE9 /job:074102EF98614E08A7D169276F8F455F /ReportName:Billing_Info</Arguments>
</Exec>
</Actions>
</Task>
And here is what happens in the task scheduler log:
Level,Date and Time,Event ID,Task Category,Operational Code,Correlation Id
Information,4/13/2010 1:30:03 AM,102,Task completed,(2),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler successfully finished ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
Information,4/13/2010 1:30:03 AM,201,Action completed,(2),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler successfully completed task ""\41782F0EA57247BFA811921449F51BE9"" , instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" , action ""E:\beb\Newt\bin\jobstub.exe"" with return code 0."
Information,4/13/2010 1:30:00 AM,129,Created Task Process,Info,00000000-0000-0000-0000-000000000000,"Task Scheduler launch task ""\41782F0EA57247BFA811921449F51BE9"" , instance ""E:\beb\Newt\bin\jobstub.exe"" with process ID 5320."
Error,4/13/2010 1:30:00 AM,101,Task Start Failed,Launch Failure,00000000-0000-0000-0000-000000000000,"Task Scheduler failed to start ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts"". Additional Data: Error Value: 2147750687."
Warning,4/13/2010 1:30:00 AM,322,"Launch request ignored, instance already running",Info,b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler did not launch task ""\41782F0EA57247BFA811921449F51BE9"" because instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" of the same task is already running."
Information,4/13/2010 1:30:00 AM,200,Action started,(1),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler launched action ""E:\beb\Newt\bin\jobstub.exe"" in instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" of task ""\41782F0EA57247BFA811921449F51BE9""."
Information,4/13/2010 1:30:00 AM,100,Task Started,(1),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler started ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
Information,4/13/2010 1:30:00 AM,319,Task Engine received message to start task,(1),00000000-0000-0000-0000-000000000000,"Task Engine ""S-1-5-21-154405328-2802981858-2054149546-68593:INT\bebprdnutsassword:"" received a message from Task Scheduler service requesting to launch task ""\41782F0EA57247BFA811921449F51BE9"" ."
Information,4/13/2010 1:30:00 AM,107,Task triggered on scheduler,Info,30b595e8-d91c-4c3f-a4a3-8d23729821cf,"Task Scheduler launched ""{30B595E8-D91C-4C3F-A4A3-8D23729821CF}"" instance of task ""\41782F0EA57247BFA811921449F51BE9"" due to a time trigger condition."
Information,4/13/2010 1:30:00 AM,107,Task triggered on scheduler,Info,b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler launched ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of task ""\41782F0EA57247BFA811921449F51BE9"" due to a time trigger condition."
Information,4/12/2010 1:30:06 AM,102,Task completed,(2),c8e3b8e0-32fe-4e49-8e38-04c3dfb01291,"Task Scheduler successfully finished ""{C8E3B8E0-32FE-4E49-8E38-04C3DFB01291}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
As you can see, the task completed successfully the day before on 4/12. Then it triggered twice and creates two instances of the task on the 13<sup>th</sup>. One fails, and one completes. The next day, only one instance gets kicked off.
The server is running Windows 2008 standard SP2. Very vanilla HP server hardware. 4 gig of RAM, and 2 CPUs. The task scheduler does this approximately 2-5 times per day on (seemingly) random tasks. I would estimate that the task scheduler on this system kicks off approximately 2000 tasks per day. I do not think it is load related. The example task above runs at a very slow time of the day for tasks.
Any insight would be appreciated.
Regards,
-aspolivka
Continue reading...
I can see nothing in task scheduler, or in the specific task that would account for the task being triggered twice. Here is an example of the task in question:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Description>100000;VMS Reports</Description>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2009-04-28T01:30:00</StartBoundary>
<EndBoundary>9999-12-31T23:59:59.999</EndBoundary>
<Enabled>true</Enabled>
<ScheduleByWeek>
<DaysOfWeek>
<Monday />
<Tuesday />
<Wednesday />
<Thursday />
<Friday />
<Saturday />
</DaysOfWeek>
<WeeksInterval>1</WeeksInterval>
</ScheduleByWeek>
</CalendarTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>INT\bebprdnuts</UserId>
<LogonType>Password</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<IdleSettings>
<Duration>PT10M</Duration>
<WaitTimeout>PT1H</WaitTimeout>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>E:\beb\Newt\bin\jobstub.exe</Command>
<Arguments>/inst_id:41782F0EA57247BFA811921449F51BE9 /job:074102EF98614E08A7D169276F8F455F /ReportName:Billing_Info</Arguments>
</Exec>
</Actions>
</Task>
And here is what happens in the task scheduler log:
Level,Date and Time,Event ID,Task Category,Operational Code,Correlation Id
Information,4/13/2010 1:30:03 AM,102,Task completed,(2),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler successfully finished ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
Information,4/13/2010 1:30:03 AM,201,Action completed,(2),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler successfully completed task ""\41782F0EA57247BFA811921449F51BE9"" , instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" , action ""E:\beb\Newt\bin\jobstub.exe"" with return code 0."
Information,4/13/2010 1:30:00 AM,129,Created Task Process,Info,00000000-0000-0000-0000-000000000000,"Task Scheduler launch task ""\41782F0EA57247BFA811921449F51BE9"" , instance ""E:\beb\Newt\bin\jobstub.exe"" with process ID 5320."
Error,4/13/2010 1:30:00 AM,101,Task Start Failed,Launch Failure,00000000-0000-0000-0000-000000000000,"Task Scheduler failed to start ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts"". Additional Data: Error Value: 2147750687."
Warning,4/13/2010 1:30:00 AM,322,"Launch request ignored, instance already running",Info,b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler did not launch task ""\41782F0EA57247BFA811921449F51BE9"" because instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" of the same task is already running."
Information,4/13/2010 1:30:00 AM,200,Action started,(1),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler launched action ""E:\beb\Newt\bin\jobstub.exe"" in instance ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" of task ""\41782F0EA57247BFA811921449F51BE9""."
Information,4/13/2010 1:30:00 AM,100,Task Started,(1),b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler started ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
Information,4/13/2010 1:30:00 AM,319,Task Engine received message to start task,(1),00000000-0000-0000-0000-000000000000,"Task Engine ""S-1-5-21-154405328-2802981858-2054149546-68593:INT\bebprdnutsassword:"" received a message from Task Scheduler service requesting to launch task ""\41782F0EA57247BFA811921449F51BE9"" ."
Information,4/13/2010 1:30:00 AM,107,Task triggered on scheduler,Info,30b595e8-d91c-4c3f-a4a3-8d23729821cf,"Task Scheduler launched ""{30B595E8-D91C-4C3F-A4A3-8D23729821CF}"" instance of task ""\41782F0EA57247BFA811921449F51BE9"" due to a time trigger condition."
Information,4/13/2010 1:30:00 AM,107,Task triggered on scheduler,Info,b46876c1-db78-45a2-8430-713eed5110f7,"Task Scheduler launched ""{B46876C1-DB78-45A2-8430-713EED5110F7}"" instance of task ""\41782F0EA57247BFA811921449F51BE9"" due to a time trigger condition."
Information,4/12/2010 1:30:06 AM,102,Task completed,(2),c8e3b8e0-32fe-4e49-8e38-04c3dfb01291,"Task Scheduler successfully finished ""{C8E3B8E0-32FE-4E49-8E38-04C3DFB01291}"" instance of the ""\41782F0EA57247BFA811921449F51BE9"" task for user ""INT\bebprdnuts""."
As you can see, the task completed successfully the day before on 4/12. Then it triggered twice and creates two instances of the task on the 13<sup>th</sup>. One fails, and one completes. The next day, only one instance gets kicked off.
The server is running Windows 2008 standard SP2. Very vanilla HP server hardware. 4 gig of RAM, and 2 CPUs. The task scheduler does this approximately 2-5 times per day on (seemingly) random tasks. I would estimate that the task scheduler on this system kicks off approximately 2000 tasks per day. I do not think it is load related. The example task above runs at a very slow time of the day for tasks.
Any insight would be appreciated.
Regards,
-aspolivka
Continue reading...