예제 #1
0
 public static TriggerBuilder TriggerInterval_(this TriggerBuilder builder,
                                               TimeSpan interval, string name, string group = null, DateTimeOffset?start = null, int?repeat_count = null)
 {
     builder = builder.WithIdentity_(name, group);
     builder = builder.WithSimpleSchedule(x =>
     {
         x = x.WithIntervalInSeconds((int)interval.TotalSeconds);
         if (repeat_count == null)
         {
             x = x.RepeatForever();
         }
         else
         {
             x = x.WithRepeatCount(repeat_count.Value);
         }
     });
     builder = builder.Start_(start);
     return(builder);
 }