This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 29th, 2013  |  syntax: None  |  size: 0.72 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var trigger = TriggerBuilder.Create()
  2.     .ForJob(job)
  3.     .WithSimpleSchedule(schedule => schedule.WithIntervalInMinutes(1).RepeatForever())
  4.     .Build();
  5.  
  6. scheduler.ScheduleJob(job, trigger);
  7.  
  8. // Pause job immediately
  9. scheduler.PauseJob(job.Key);
  10.        
  11. var trigger = TriggerBuilder.Create()
  12.     .ForJob(job)
  13.     .WithSimpleSchedule(schedule => schedule.WithIntervalInMinutes(1).RepeatForever())
  14.     .StartAt(SystemTime.UtcNow().AddSeconds(5))
  15.     .Build();
  16.  
  17. scheduler.ScheduleJob(job, trigger);
  18.  
  19. scheduler.PauseTrigger(trigger.Key);
  20.        
  21. var trigger = TriggerBuilder.Create()
  22.     .ForJob(job)
  23.     .WithSimpleSchedule(schedule => schedule.WithIntervalInMinutes(1).RepeatForever())
  24.     .StartAt(DateTime.UtcNow.AddMinutes(30))
  25.     .Build();
clone this paste RAW Paste Data