Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.