"TFSServerScheduler" Service does not start automatically at system startup

Recently I have been working on a case about Visual Studio Team Foundation Server Task Scheduler service. A customer reported that in a single server TFS 2008 deployment,  when TFS server is rebooted, TFSServerScheduler doesn’t start automatically. Instead, there’s an error message in Windows Event Log:

Source: "TFS Scheduler"

TF53010: The following error has occurred in a Team Foundation component or
extension:
Date (UTC): 20.05.2009 08:16:35
Machine: xxx
Application Domain: TFSServerScheduler.exe
Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details: 
Process Name: TFSServerScheduler 
Process Id: 2920 
Thread Id: 3092 
Account name: domain\user

Detailed Message: Unable to connect to the remote server

The interesting thing is that when you try to start TFSServerScheduler service manually, it starts successfully and everything works fine!

After some digging, we eventually came to Fun with the TFSServerScheduler service. In that post, it says TFSServerScheduler depends on SQL Server service in a single server TFS deployment. If SQL Server starts slower than TFSServerScheduler, then TFSServerScheduler will crash and exit.

In my case however, it is a bit different. it turns out TFSServerScheduler also depends on World Wide Web Publishing Service (W3SVC). You can verify this by stopping W3SVC, then restart TFSServerScheduler. TFSServerScheduler can be started but will exit after several seconds. The same error message as I posted will be added to Windows Event Log.

You might have already figured out the workaround. We can configure TFSServerScheduler to depend on W3SVC. One approach is to run command: sc config TFSServerScheduler depend= W3SVC. Please note that there’s a space between the equal sign and W3SVC. Then open the property dialog for TFSServerScheduler and check if its dependency is configured correctly.

I can’t say for sure which services are actually dependent by TFSServerScheduler. But I believe we can find them out if we meet similar issues in the future.

Have attended my first event in TeamSystemLive

TeamSystemLive is a great social network created by Chris Tullier. There are a lot of people who use TFS every day there. Until now, I only know several professional TFS administrators in China. TeamSystemLive gives me a great many of opportunities to talk with TFS experts and exchange knowledge.

Today I attended my first event in TeamSystemLive. It was TeamSystemLive.com Chat: WiX and Team Build Together at Last which is presented by William Bartholomew. William gave us an excellent demonstration about how to build an MSI package with WIX. He will  give us another 3 talks about team build. Please refer to May is Build Month on TeamSystemLive.com for more information. Don’t miss them!