Service Engineer, Microsoft Visual Studio Online - Team Foundation Server
This is a question that I get occasionally, and it’s covered in more detail in the Professional Team Foundation Server 2012 book that I wrote.
Team Foundation Server has a Job Agent built in. It’s implemented as a Windows Service that runs on your Application Tier servers. There are some tables and stored procedures in the Tfs_Configuration database and your collection databases that define the jobs, the job queue and the job history. You can read more about the internals of the TFS Background Job Agent in Chris Sidi’s blog post, including how to control it using the TFS API and PowerShell.
The following table describes all of the jobs across the configuration and collection databases and their default schedule:
Build Cleanup Job
Build Information Cleanup Job
Build Warehouse Sync
Cleanup Discussion Database
Cleanup TestManagement Database
Common Structures Warehouse Sync
File Container Cleanup
Job History Cleanup Job
Message Queue Cleanup Job
7 days (collection)1 day (configuration)
Prune Registry Audit Log
Repopulate Dynamic Suites
Security Identity Cleanup Job
Synchronize Test Cases
Team Foundation Server Activity Logging Administration
Team Foundation Server Coverage Analysis
Team Foundation Server Event Processing
Team Foundation Server Framework Data Cleanup
Team Foundation Server Framework File Service Cleanup
Team Foundation Server Send Mail Job
Test Management Warehouse Sync
Upgrade - Version Control Code Churn Online
Version Control Administration
Version Control Code Churn
Version Control Delta Processing
Version Control Statistics Update
Version Control Warehouse Sync
Work Item Tracking Administration
Work Item Tracking Integration Synchronization
Work Item Tracking Referenced Identities Update
Work Item Tracking Remove Orphan Attachments
Work Item Tracking Remove unused constants
Work Item Tracking Warehouse Sync
The ones that I often get questions about are the following:
Update: Thanks for the comment Tommy - I forgot a very important aspect of some of these jobs. Although the default schedules are listed above, some of them are queued 'on demand' by events that happen in TFS. Two examples of this are:
Another concept which you might come across is 'Host Dormancy'. This is a feature built-in to the 'kernel' of TFS that will pause jobs from running if a collection hasn't been accessed in a period of time. If a collection isn't being accessed, that means that the data isn't changing, so there's no need to run some jobs. This is key functionality that allows the Team Foundation Service to scale to thousands of collections.
How about the more frequent jobs?
If I'm not mistaken there is a job that checks if emails should be sent that runs every 2 minutes, and a job that runs every 5 minutes to update the Warehouse from the TPC databases?
It's a great list btw, I just want to clear up possible confusion on my side.
@Tommy - I updated the post with an answer to your question. Hope that clears up the confusion.
Any chance of getting descriptions for what each of these jobs do, specifically "Work Item Tracking Integration Synchronization"?
@Computerpaul - Most of them are self-explanatory. Were there any in particular you wanted to know about?
Page 692 of the book I wrote describes some of the important ones. Grab yourself a copy at http://bit.ly/ProTFS2012
@Grant Holliday - I was specifically looking for the "Work Item Tracking Integration Synchronization" job