Scheduled task running twice from time to time

6,960

Well, looks like it's a bug in the OS. MS has a fix available there: http://support.microsoft.com/kb/2461249

Share:
6,960

Related videos on Youtube

Stephane
Author by

Stephane

Updated on September 18, 2022

Comments

  • Stephane
    Stephane over 1 year

    A customer of mine is experiencing a very strange problem: a scheduled task is running twice from time to time, with only a few seconds between execution.

    The task is scheduled using the windows scheduler. It's a very basic task that connects to a local service using TCP/IP, authenticate, gives it a command and disconnect. It is nearly instantaneous (the longest part actually is the SSL handshake).

    It triggers an issue in the server application which I will fix but my problem is that I simply cannot find any valid reason why the task is being run twice: nobody is ever connected interactively to that machine (it's an application server) and the server log shows that all these connections come from 127.0.0.1. Sending port and thread IDs both changes indicating in a very clear way that this is no some internal "ghosting" effect in the server application.

    Unfortunately, task history wasn't enabled on that server so I don't have a run trace on that front. I have enabled it and, should the problem occur again, I will check it. I've verified, however, that nobody was connected to the machine around the time to issue occurred.

    Can anyone explain this ?

    Thanks

    • Ansgar Wiechers
      Ansgar Wiechers over 11 years
      Is the task configured to not start a new instance when it's already running?
    • Stephane
      Stephane over 11 years
      Yes it is. But the task typically runs for less than a second and the duplicate runs I see are typically 5 to 10 seconds apart.
    • Brent Pabst
      Brent Pabst over 11 years
      Any luck getting it to repro with a log?
  • lance
    lance about 10 years
    If I understood correctly, that hotfix cites the cause being overlapping start/end time on an hourly boundary. Sounds like your scenario didn't quite fit that description. Did you install this hotfix? Did it solve your problem?
  • Stephane
    Stephane about 10 years
    As far as I know, it solved the issue: once I directed my customer to the hotfix, they never complained about it any more.