Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void DeleteJob(SPFeatureReceiverProperties properties)
- {
- SPSecurity.RunWithElevatedPrivileges(delegate () {
- SPSite site = properties.Feature.Parent as SPSite;
- // delete the job
- site.WebApplication.JobDefinitions.Where(t => t.Name.Equals(jobName)).ToList().ForEach(j => j.Delete());
- });
- }
Add Comment
Please, Sign In to add comment