/// <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); }
/// <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); }