Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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:

  1. Disable the timer job using the UI in Central Administration (Central Administration -> Operations -> Job Definitions)
  2. Disable the timer job programmatically

    SPJobDefinitionCollection jobDefs = webApp.JobDefinitions;
    foreach (SPJobDefinition jobDef in jobDefs)
    {
        if (jobDef.DisplayName == "YourTimerJobName")
        {
            jobDef.IsDisabled = true;
            jobDef.Update();
        }
    }
    
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.