コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="scheduleBuilder"></param>
 /// <param name="interval"></param>
 /// <returns></returns>
 public static ScheduleBuilder WithIntervalInMinutes(this ScheduleBuilder scheduleBuilder, int interval)
 {
     scheduleBuilder.SetCronExpression($"0 0/{interval} 0 ? * * *");
     return(scheduleBuilder);
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="scheduleBuilder"></param>
 /// <param name="cron"></param>
 /// <returns></returns>
 public static ScheduleBuilder WithCronExpression(this ScheduleBuilder scheduleBuilder, string cron)
 {
     scheduleBuilder.SetCronExpression(cron);
     return(scheduleBuilder);
 }