Skip to content

Instantly share code, notes, and snippets.

@splessons
Created December 13, 2013 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splessons/7942561 to your computer and use it in GitHub Desktop.
Save splessons/7942561 to your computer and use it in GitHub Desktop.
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPWebApplication parentWebApp = (SPWebApplication)properties.Feature.Parent;
SPSite site = properties.Feature.Parent as SPSite;
DeleteExistingJob(JobName, parentWebApp);
CreateJob(parentWebApp);
});
}
catch(Exception ex){
throw ex;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment