Guest User

Untitled

a guest
Oct 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. private void DeleteJob(SPFeatureReceiverProperties properties)
  2. {
  3. SPSecurity.RunWithElevatedPrivileges(delegate () {
  4. SPSite site = properties.Feature.Parent as SPSite;
  5.  
  6. // delete the job
  7. site.WebApplication.JobDefinitions.Where(t => t.Name.Equals(jobName)).ToList().ForEach(j => j.Delete());
  8. });
  9. }
Add Comment
Please, Sign In to add comment