0

am trying to delete the custom timer job I have created in my SP 2013 on-prem.env. I used the powershell to do the same,but its not getting deleted/removed from the central admin. I tried with restarting the sp timer service and sp admin service and iisreset as well. refer : Delete-SPTimer-JOB-link But still, am able to see the timer job in the timerjob definitions page.

  add-pssnapin "microsoft.sharepoint.powershell"


  Get-SPTimerJob | where {$_.name -like "NPD Timer Job"} |fl
  $badjobTake2 = Get-SPTimerJob -ID "55166609-014a-4c0c-bd1b-
  e7cac0585dcd"
  $badjobTake2.Delete()  

Is there anyway, I can completely remove the timerjob ref from the ContentDB as well? it seems , somewhere the timerjob name is mentioned in Config DB or webappln DB.

note: I have renamed the customer job from a old name to new name. is this not allowed? Will this cause an issue when re-deploying onto the same farm?

1 Answer 1

0

Try to delete the job by name instead of ID

$jobToDelete = Get-SPTimerJob | ? { $_.name -eq "customTimerJobName" }
$jobToDelete.Delete()
2
  • I already tried this and it didn't work, that's why I went to fetch the ID and tried to delete the same. Any idea , how to remove he reference from content db ? though its not supported, in dev env, I think its OK to delete using the content db id /reference.
    – samolpp2
    Apr 26, 2017 at 13:49
  • Have you tried to do the same through code i.e. on deactivating the timer job feature delete the timer job. And then check the reference of that timer job. Apr 26, 2017 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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