daily pastebin goal
94%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ScheduledJob: IScheduledJob
  2. {
  3.   public void Run()
  4.   {
  5.     ISchedulerFactory SchedulerFactory = new StdSchedulerFactory();
  6.     IScheduler scheduler = SchedulerFactory.GetScheduler();
  7.     scheduler.Start();
  8.  
  9.     IJobDetail job = JobBuilder.Create <HelloWorldJob>().Build();
  10.     ITrigger trigger = TriggerBuilder.Create().StartNow().WithDailyTimeIntervalSchedule(x => x.WithIntervalInSeconds(5)).Build();
  11.  
  12.     scheduler.ScheduleJob(job, trigger);
  13.   }
  14. }
RAW Paste Data
Top