locked
Strange Problem in Windows 2008 Task Scheduler RRS feed

  • Question


  • 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\bebprdnuts:Password:""  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

    Wednesday, April 14, 2010 6:43 PM

All replies

  • Hi,

    Did you choose the option "Do not start  a new instance, If the task is already running, then the following tule applies" in this task's settings?

    Does this behavior occur on other tasks on this server?

    Regards,

    Wilson Jia


    This posting is provided "AS IS" with no warranties, and confers no rights. Please click "Mark as Answer" when you get the correct reply to your question.
    Thursday, April 15, 2010 3:40 AM
  • Yes, the "Do not start a new instance" option is selected.  It is the default and I believe that that is why we get theerror code 2147750687 on the second invocation of the task.  So, I guess I would expect that behavior.  The real question is why is the trigger invoked twice?

    This behavior does occur on other tasks.  It occurs on very simple tasks like the one above with only a single time trigger, as well as on tasks with slightly more complicated schedules.  It appears to be rather random.

    Thursday, April 15, 2010 11:57 AM
  • Hello there,

    I have the same problem and no more ideas what can help. I want my task to run every hour, so I first tried a daily trigger with "repeat every hour for a duration of 1 day". Thought that may be this option has a bug, so I made 24 single triggers. But anyway I got the effect, that the task apparently randomly starts twice. I have the problem on several servers. They are all German Windows Server 2008 x64.
    Multiple instances are explicitly allowed, therefore I don't get the error which the thread starter reported.

    Please help
    Bent

    Thursday, April 22, 2010 11:30 AM
  • Hello, everyone,

     

    I have the same problem and I can't find any related help. my task must run every minute, so I added a daily trigger with "repeat every minute for a duration of 1 day". When I run the task, the action is O.K. , but when the task run for a random duration, It suddenly invoked twice. and show the same error code 2147750687.

     

    Please help me

    Kevin

    Monday, July 12, 2010 1:55 PM
  • Hello, everyone,

     

    I have the same problem and I can't find any related help. my task must run every minute, so I added a daily trigger with "repeat every minute for a duration of 1 day". When I run the task, the action is O.K. , but when the task run for a random duration, It suddenly invoked twice. and show the same error code 2147750687.

     

    Please help me

    Kevin

    Hi!

    I had the same problem.

    It seems that this problem appears, because of two instance of task scheduler is running... may be i'm wrong, but after rebooting the system - i  have a lot oа happy ))))) So just reboot the system and see what you got)

    P.S. sorry for my English ;)

    Thursday, July 22, 2010 11:20 PM
  • This is still happening to us.  I don't believe that it is due to multiple instances of the task scheduler running.  I don't see any evidence of that in task manager, at least. I think I'm going to have to open an incident for this as a potential bug since quite a few other people are experiencing it.
    Friday, October 22, 2010 9:32 PM
  • try this "run with highest privileges"
    Thursday, December 16, 2010 2:32 AM
  • I have the same issue. Getting event 101 and an error value of 2147750687.

    All the task properties are right in that it's set to run with the highest priveledges. I've checked that the task has full read and execute permissions to the exe we're trying to run. The task just sits there and eventually times out as per settings. I've got it all set to run with full domain admin rights and it still fails to execute. If you select the task that gets published from the server it runs normally and the program is installed. The really odd thing is that I have 2 sites running identical systems (they were even imaged form the same source so they are iodentical in every respect). On my other site the sophos AV install all installs automatically without any human intervention.

    As the task gets published I'm ruling out any firewall iissues and the fact that domain admins is used to publish and run the task (and the task can be manually run) it's not likely to be permissions based. I've spent many an hour on this and tried all manor of changes on the client like turning of the UAC. I also occasionally get a response from the History tab that Idon't have permission to view the log ?? leading me to think that perhaps the task scheduler itself is perhaps suffering from a few bugs. if I exit and re-open the scheduler all appears well again.

    If I leave the task alone and wait for it to time out there are no errors logged, If I select the task and then click run the task executes and Sophos AV installs as it should however this is when the errors get logged - "Task start Failed - Launch failure"the next log after that is Event 129 task launch.

    very frustrating.

     

    Friday, January 14, 2011 11:27 AM
  • I too have experienced this issue.  I've tried changing everything you can check and uncheck.  I've retyped actions and triggers.  I've Disabled then Enabled.  I've tried combinations of all three.  I've rebooted the server, then did it all again.  I'm sorry to say the only sure thing that has fixed it is to delete the scheduled task and start from scratch.  I can retype it in EXACTLY the same way as the original and for some reason the issue is gone.
    -- txkos
    Tuesday, March 1, 2011 11:35 PM
  • I was getting the same errors every time my process would start up. The process would run without problems, but would appear to attempt to start up multiple times. The trigger for the task was as follows:

     

    Settings:

    Daily, repeat every 1 day

     

    Advanced Settings:

    Repeat task every 15 minutes for a duration of 1 day

     

    To fix this, I changed that to

     

    Settings:

    One time

     

    Advanced Settings:

    Repeat task every 15 minutes indefinitely

     

    I'm not sure why this fixed the problem, but it did. I hope this works for someone else as well :)

    • Proposed as answer by Jayb0y Friday, September 12, 2014 4:17 PM
    Friday, March 4, 2011 9:01 PM
  • Thursday, June 23, 2011 5:47 AM
  • That KB doesn't apply to my situation. These are Windows 7 clients and I dont have an issue specifically stated in that KB.

    My situation still remains an issue and does appear to (occasionally) randomly work as it should, but 99% of the time the task fails to execute despite remaining in the tasks with a ready status. And as it's to automatically push out Sophos Anti Virus this can be leaving some clients vulnerable. :(

    HELP !!

    Tuesday, June 28, 2011 12:14 PM
  • hello we are experiencing the same problem 1 scheduled task on server 2008 R2 with a time trigger of: One time Repeat task every 10min Indefinitely Randomly we get: Task Scheduler failed to start "\Microsoft\Windowsxxx" task for user "xxx\xxx". Additional Data: Error Value: 2147750687. Together with in System event log: The kerberos SSPI package generated an output token of size 155 bytes, which was too large to fit in the token buffer of size 111 bytes, provided by process id 1376. The application needs to be fixed to supply a token buffer of size at least 65535 bytes. which resulted in the following article: http://technet.microsoft.com/en-us/library/dd348776%28WS.10%29.aspx changed on all three domain controllers but error persists scheduled task seems to be hanging in the running state, due to the kereberos warning it hangs and does not quit the instance
    Tuesday, June 28, 2011 12:43 PM
  • Hi,

    Did you solved this problem ? We have same problem here :-( After restart it is OK several days but then the task is triggering 2 - 3 - 4 times on two servers Windows 2008 standard.

     

    Thanks and regards,

    MK

     

    Tuesday, July 19, 2011 8:23 AM
  • I can see two taskeng.exe processes in process explorer could this be a problem ?

    Thanks and regards,

    MK

     

    Tuesday, July 19, 2011 9:07 AM
  • it's probably because there are two tasks always running: Certificate Services Client Tasks handler. What process is then responsible for triggering tasks ?
    Tuesday, July 19, 2011 9:33 AM
  • I guess that's because you use a Domain account to run this task, but your Domain server time is not sync with your current server time.

    I solve this issue in my server with following steps:

    1.Invoked one local admin user account.

    2.In General tab-> Security options: select this local local admin user account as the running task user.

     

    • Edited by salanhess Friday, September 9, 2011 2:55 AM
    Friday, September 9, 2011 2:49 AM
  • Mike DiClemente's answer is what worked for me.

    Change the Trigger to "One Time" but then set the "Repeat task every:" options to repat your task.

    Thanks Mike!


    Chris Mang>> JDA Software Group, Inc.
    Wednesday, October 19, 2011 4:24 PM
  • Checking "Synchronize across time zones" under triggers solved my problem. Not sure if it remains consistent and doesn't fail again ;)
    Wednesday, January 18, 2012 7:59 PM
  • Yes, checking 'Synchronize across time zones' did the trick! Thanks a million times ;-)
    Monday, May 14, 2012 9:24 AM
  • Mike DiClemente's answer didn't work for me.

    I'm using Windows 7 Ultimate. It only seem to happen on my system to tasks that start simultaneous on hh:mm:00, and are sceduled to repeat every minute. When it happens it happens to all tasks at the same time. I created a restore point and applied for the hotfix. I wonder who wrote the scheduler task of MS and how he managed to make this happen......

    I don't have simultaneous tasks on other commen time moments hh:mm:xx


    Wednesday, June 27, 2012 12:42 PM
  • I installed hotfix 2461249, which can be found here: http://support.microsoft.com/kb/2461249

    and the double start problems are gone, already 4 days now :)


    Tuesday, July 3, 2012 11:03 PM
  • Does anyone know why this solves the problem? It solved mine. But the task is within1 time zone only.
    • Proposed as answer by Stan Smoltis Wednesday, November 7, 2012 7:51 AM
    • Unproposed as answer by Stan Smoltis Wednesday, November 7, 2012 7:51 AM
    Tuesday, September 25, 2012 12:07 PM
  • I had trigger set to Daily run and repeat every 30 min. The problem raised  the next day.

    Obviously both (daily and every 30 min) conditions are true after 24h. This overlap of scedules pops up this problem.


    --- VITRU SSA SPB---

    • Proposed as answer by Stan Smoltis Wednesday, November 7, 2012 7:55 AM
    Wednesday, November 7, 2012 7:52 AM
  • I have the some problem with one task. It used to work fine. It has 5 "Task Triggered on Server" events. The next event serries is "Task Engine recieved message to start task" , "Action Started", "Launch request ignored, instance already running","Task started", "Task Start failed", "Launch request ignored, instance already running","Task start failed", "Launch request ignored, instance already running","Task start failed", "Launch request ignored, instance already running","Task start failed","Created Task Process", "Action Completed" "Task completed".

    The Last Run Result says " The Operation completed successfully" and the "Last Run Time" stamp is correct. However, the task did not run.

    If I click "Run", the task executes correctly with no errors.

    Monday, July 8, 2013 10:47 PM
  • I tried both Nagesh's and Mike DiClemente's solutions on a production server without success We are still getting the simultaneous double-triggering.

    The next option would be the hotfix, but I suspect we might just live with the error messages because it's not causing any other adverse effects.

    If it were bundled with a service pack we'd install it as part of routine maintenance, however I'm not sure it warrants the fuss of rolling out an individual hotfix.

    Monday, December 2, 2013 12:27 AM
  • Cheers, it also fixed my issue! Thanks Mike!
    Wednesday, January 22, 2014 2:40 PM
  • Hi,

    I has been a while since original posting, and it might not directly related, but I'll give my input on this issue, since this page was always first hit no matter how I worded my issue in search field. While troubleshooting, I found out that once I ran the task it would never finish properly. When I click on the "Display All Running Tasks" in the right pane of the Task Scheduler, that one particular task would be shown as still running. Now, my task was a Batch file, so I thought it must not exit cleanly. In the end, the solution was to add "exit" as the last line in batch file AND hit enter right after it, so that that cursor went down on the new line. I saved the batch file right after, and my task was running fine since then.

    Hope it helps.




    • Proposed as answer by Pavel Leskov Tuesday, April 29, 2014 9:02 PM
    • Edited by Pavel Leskov Tuesday, April 29, 2014 9:12 PM
    Tuesday, April 29, 2014 9:01 PM
  • Came across this thread, while trying to troubleshoot this issue.

    So, adding the solution in my case, in the hope that it helps others:

    If running a PowerShell script (as I was), make sure that you are not using the -noexit command line argument!

    Monday, July 14, 2014 3:57 PM
  • Thank you, Mike DiClemente! Yours was the solution for me. It had been plaguing me for months. Task scheduler was spawning multiple instances (up to 18 within the same second) but once I changed to "one time" + interval + "indefinitely", this behavior stopped. 
    • Edited by Jayb0y Friday, September 12, 2014 4:18 PM
    Friday, September 12, 2014 4:16 PM
  • I had this problem on one node of a cluster.  I couldn't just failover the node until the next scheduled maintenance period, so I exported and imported the task.  Task Scheduler (I assume) gave it a new ID and the problem went away with the next scheduled run (every 5 minutes).  I intend to do the same export/import on the passive node with the corresponding task there and then perform a failover and reboot on both nodes to make sure nothing is lingering in memory.
    Tuesday, December 2, 2014 6:54 PM
  • This worked for me:

    Duplicate triggers are generated incorrectly in scheduled tasks in Windows Vista or in Windows Server 2008
    https://support.microsoft.com/hotfix/kbhotfix.aspx?kbnum=2617046&kbln=en-US

    Hope works for you.

    Tuesday, January 9, 2018 10:58 PM
  • I was getting the same errors every time my process would start up. The process would run without problems, but would appear to attempt to start up multiple times. The trigger for the task was as follows:

     

    Settings:

    Daily, repeat every 1 day

     

    Advanced Settings:

    Repeat task every 15 minutes for a duration of 1 day

     

    To fix this, I changed that to

     

    Settings:

    One time

     

    Advanced Settings:

    Repeat task every 15 minutes indefinitely

     

    I'm not sure why this fixed the problem, but it did. I hope this works for someone else as well :)

    Excellent! This helped for me also, thanks :)
    Tuesday, June 4, 2019 6:34 AM