Wednesday, October 8, 2008

Enable the “Delete” Button in Timer Job Definitions


This is a trick I picked up from Brett when we were deploying a custom SharePoint timer job last week.  Quite a handy trick that allows you to delete a timer job definition directly from Central Administration without the needed for the STSADM.EXE commands. 

From Central Administration > Operations > Timer Job Definitions, when you click on a job definition you see a screen similar to this:

TimerJobDeleteButton1


To enable the “Delete” button from this same screen, we simply have to modify an ASPX file under the “12” hive.  Under “\12\TEMPLATE\ADMIN”, find the file named “JobEdit.aspx” and open it with Notepad.  Find the line of markup containing:

OnClick="BtnDeleteJob_Click"

That control has its “visible” property set to “false.”  Simply change that to “true” and save the file.  Then refresh the page, and sure enough – we have a Delete button!

TimerJobDeleteButton2