Created
January 13, 2018 05:30
-
-
Save hbulens/de3d849816a6737455a8caa71a43e58b 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
public class ScheduledJob: IScheduledJob | |
{ | |
public void Run() | |
{ | |
ISchedulerFactory SchedulerFactory = new StdSchedulerFactory(); | |
IScheduler scheduler = SchedulerFactory.GetScheduler(); | |
scheduler.Start(); | |
IJobDetail job = JobBuilder.Create <HelloWorldJob>().Build(); | |
ITrigger trigger = TriggerBuilder.Create().StartNow().WithDailyTimeIntervalSchedule(x => x.WithIntervalInSeconds(5)).Build(); | |
scheduler.ScheduleJob(job, trigger); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment