Please provide me stsadm command to disable timer job in sharepoint 2007 I want to disable not delete so that in future I can enable it again if required
Checking the list of ststadm operations seems that there is no stsadm command for disabling a timer job. There is only a command to delete a timer job (deletessptimerjob).
In that case you are left with two options:
- Disable the timer job using the UI in Central Administration (Central Administration -> Operations -> Job Definitions)
Disable the timer job programmatically
SPJobDefinitionCollection jobDefs = webApp.JobDefinitions; foreach (SPJobDefinition jobDef in jobDefs) { if (jobDef.DisplayName == "YourTimerJobName") { jobDef.IsDisabled = true; jobDef.Update(); } }