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
Date (UTC): 20.05.2009 08:16:35
Application Domain: TFSServerScheduler.exe
Assembly: Microsoft.TeamFoundation.Common, Version=184.108.40.206, Culture=neutral,
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.