Task Scheduler Changes in Windows Vista and Windows Server 2008 – Part Three

Task Scheduler Changes in Windows Vista and Windows Server 2008 – Part Three

  • Comments 7
  • Likes

Good Morning AskPerf!  Today we’re going to wrap up our series on Task Scheduler Changes in Windows Vista and Windows Server 2008.  If you haven’t read my previous posts on Task Scheduler, I highly recommend reading those first.  The two posts are:

We discussed several of the architectural pieces and new features in these posts including:

  • Support for a security isolation model in which each set of tasks running in a specific security context runs in a separate session
  • Option to retry tasks in case of failure
  • Trigger task based on any event captured in the event log

So what does the whole picture look like?  Below is the diagram that is published in the Windows Vista Resource Kit:image

As we can see, the shared SVCHOST.EXE process is the primary component here.  The process loads the Task Scheduler Service DLL (SCHEDSVC.DLL) using a Local System account, and then uses TASKSCHD.DLL to interface with the Resource Manager.  CredMan and S4U are used to acquire the credentials.  Configuration information is gleaned from the registry,  Job tasks are written to the disk in XML format.

The Transient Control Process that is listed in the diagram is TASKENG.EXE.  TASKENG.EXE is the engine that runs in the task-defined user context and logs the event log messages.  It also generates the various processes that execute the actions defined in the task.

For tasks created in previous versions of Windows, there is a specific DLL (TASKCOMP.DLL) that provides backwards compatibility for the task management and execution.

With that, we’ve reached the end of our three-part series on Task Scheduler.  Hopefully this information helps you understand some of the different features and capabilities.  Take care!

- Blake Morrison

Share this post :
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Why does Task Scheduler lose credentials?

    I have 2 vista computers in a workgroup network.  I used the task scheduler to perform a copy from the 2nd computer's shared folder.  I setup the same user account/pw on both computers.  I set the task to use this account and set the "Run whether user is logged on or not" option.  I log off.

    The new scheduled task works great - UNTIL I restart/reboot the computer, then I get a "Launch Failure" in the task's History log (error value: 2147943726)

    If I re-enter the user credentials in the task, it again runs properly every night as scheduled,  until the computer is restarted!!

    Any ideas?  Thanks

  • I have the exact same problem as Michel -- with Vista Home Premium.   Tasks will be run automatically by Vista UNTIL I reboot or log off and log on.  None of the usual "fixes" seen on the 'net actually work.

    The "run at startup" suggestion doesn't help if you want a task to run every day at a given time; the suggestion to use Group Policy Editor to change some settings doesn't work well because Vista Home Premium doesn't HAVE the Group Policy Editor; the suggestion to check the "don't save password" box doesn't work if the scheduled task needs access to a network disk; the suggestion to run only when the user is logged on doesn't tell us how to set a task to run when the user is NOT logged on.

    It seems that Vista Home Premium doesn't have a funtioning task scheduler.  Even with all updates applied as of 5/25/2009.

    It would be GREAT if AskPerf would actually investigate this -- check out how many hits you get by searching the 'net for

    Vista Task Scheduler forgets password

    and notive that no one has an actual answer.

  • I have the same problem with Vista Home Premium.  I bought it because the features table had checks for all the features I needed.  I assumed the features it came with worked.  The task scheduler doesn't.  sigh.

    Does anyone know if other replacements to the task scheduler can overcome this limitation?  (If things just worked, not as many people would be wasting time making alternatives).

    Or, I noticed some of my tasks can work if I check "don't save password" where as some don't.  Specifically, I noticed the cvs client I use will work, but a few svn clients I tried don't.  Any way to fix this?

  • Exactly the same problem here with Windows 2008 - the task runs great, but when I reboot i find a bunch of "Launch Failure" without any useful data to investigate further, and the task start working again only when I log on, even checking all the various things I found also here. Tasks are also scheduled under a different username, with administrator privileges...

    Please someone help us !!

  • Was there ever an answer as to why in Windows 2008 after a reboot tasks lose their credentials?

  • Make sure the task is set to "Run whether the user is logged in or not", and the "do not store password" box is unchecked.

    this helped my issue

  • Has anyone ever seen this error?  My Task will not run unless the service account is logged in  :-(

    06/07/2012 10:15:34 AM, Error: System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID {22FBECF5-10A3-11D2-9194-204C4F4F5020} failed due to the following error: 80080005.

    I have found several solutions via Google, but to date, nothing works.