Skip to content

Instantly share code, notes, and snippets.

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 hbulens/de3d849816a6737455a8caa71a43e58b to your computer and use it in GitHub Desktop.
Save hbulens/de3d849816a6737455a8caa71a43e58b to your computer and use it in GitHub Desktop.
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