Created
December 13, 2013 10:52
-
-
Save splessons/7942652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool CreateJob(SPWebApplication site) | |
{ | |
bool jobCreated = false; | |
try | |
{ | |
SPTImerJobClass job = new SPTImerJobClass(JobName, site); | |
SPMinuteSchedule schedule = new SPMinuteSchedule(); | |
schedule.BeginSecond = 0; | |
schedule.EndSecond = 59; | |
schedule.Interval = 15; | |
job.Schedule = schedule; | |
job.Update(); | |
} | |
catch (Exception) | |
{ | |
return jobCreated; | |
} | |
return jobCreated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment