Book Image

Team Foundation Server 2015 Customization

By : Gordon Beeming
Book Image

Team Foundation Server 2015 Customization

By: Gordon Beeming

Overview of this book

Table of Contents (17 chapters)
Team Foundation Server 2015 Customization
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

How do I know whether my TFS job is running?


The easiest way to check whether your TFS job is running or not is to check out the job history table in the configuration database. To do this, you will need the job ID (we spoke about this earlier), which you can obtain by running the following query against the TFS_Configuration database:

SELECT JobId 
FROM Tfs_Configuration.dbo.tbl_JobDefinition WITH ( NOLOCK )
WHERE JobName = 'Comments to Change Set Links Job'

With this JobId, we will then run the following lines to query the job history:

SElECT * 
FROM Tfs_Configuration.dbo.tbl_JobHistory WITH (NOLOCK)
WHERE JobId = '<place the JobId from previous query here>'

This will return you a list of results about the previous times the job was run. If you see that your job has a Result of 6 which is extension not found, then you will need to stop and restart the TFS job agent. You can do this by running the following commands in an Administrator cmd window:

  net stop TfsJobAgent
  net start TfsJobAgent...