3

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

4

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();
        }
    }
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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