Empty daysOfWeek array in schedule causes Schedules failure

Developer was attempting to disable a schedule and entered empty daysOfWeek array while schedule was still set to enabled. While this isn’t the correct way to achieve what they were wanting, the resulting config when pushed to Horde generated a failure on the scheduler and broke the instance’s scheduler and UI. Easy fix to roll back the users change in P4, but would have expected this to be caught by config validator before it went live on the Horde instance.

[Attachment Removed]

** [Image Removed]Steps to Reproduce**

Add an enabled Horde schedule with an empty daysOfWeek array

The added or subtracted value results in an un-representable DateTime. (Parameter "value")
at System.DateTime ThrowDateArithmetic|Int32 param)
at EpicGames Horde Jobs,Schedules.5chedule Extensions GetNextTriggerTimeUtc(|SchedulePatter pattern, DateTime lastTimeUtc, TimeZonelnfo timeZone) in /app/Source/Programs/Shared/EpicGames.Horde/Jobs/Schedules/ISchedule.csline 221 at EpicGames Horde Jobs.5chedules,5chedule Extensions GetNextTriggerTimeUto|Schedule schedule, DateTime lastTimeUtc, TimeZonelnfo timeZone) in /app/Source/Programs/Shared/EpicGames.Horde/Jobs/5chedules/|5chedule.csline 16
at EpicGames Horde Jobs.Schedules, GetSchedule Response ctor(|Schedule schedule, TimeZonelnfo schedulerTimeZone) in /app/Source/Programs/Shared/EpicGames.Horde/Jobs/Schedules/ScheduleMessages csline 127 at HordeServer Streams, Streams Controller. CreateGetStreamResponseAsync(|Stream stream, StreamConfig streamConfig, CancellationToken cancellationToken]
at HordeServer,Streams StreamsController GetStreamsAsync(StringO projectids, Propertyfilter filter, CancellationToken cancellationToken) in /app/Source/Programs/Horde/Plugins/Build/HordeServer.Build/Streams/StreamsController.csline 98 at lambda_method944(Closure, Object)
at MicrosoftAspNetCore,Mvc.Infrastructure ActionMethodExecutor AwaitableObjectResultExecutor Execute(ActionContext actionContext, lActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Objecti] arguments at Microsoft AspNetCore Mvc.Infrastructure ControllerActioninvoker, «InvokeActionMethodAsync>g_Logged|12_1(ControllerActionnvoker invoker)
at Microsoft AspNetCore Mvc.Infrastructure ControllerActionnvoker, <InvokeNextActionFilterAsync>g_Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft AspNetCore,Mvc.Infrastructure ControllerActionlnvoker Rethrow(ActionExecutedContextSealed context)
at MicrosoftLAspNetCore.MvcInfrastructure,ControllerActionInvoker.NextiState&t next Scoped scope, Object&state, Boolean&isCompleted)
at Microsoft AspNetCore Mc.Infrastructure ControllerActionnvoker, «InvokelnnerFilterAsync» g_Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompletedi at Microsoft AspNetCore Mvc.Infrastructure Resourcelnvoker.«InvokeNextResourceFilter> g__Awaited|25_0(Resourcelnvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompletedj at Microsoft AspNetCore.Mvc.Infrastructure Resourcelnvoker.Rethrow(ResourceExecutedContextSealed context)
at MicrosoftAspNetCore.Mvc.Infrastructure Resourcelnvoker.Next(State& next, Scoped scope, Object&state, Booleande isCompleted)
at Microsoft AspNetCore,Mvc.Infrastructure Resourcelnvoker «InvokeFilterPipelineAsync> g_Awaited|20_0(Resourcelnvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompletedj at Microsoft AspNetCore Mvc Infrastructure Resourcelnvoker «Invoke Async»g_Logged|17_1 (Resourcelnvoker invoker) at Microsoft AspNetCore,Mvc.Infrastructure Resourcelnvoker « InvokeAsync>g_Logged|17_1 (Resourcelnvoker invoker) at MicrosoftAspNetCore. Authorization AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft AspNetCore Authentication AuthenticationMiddleware Invoke(HttpContext context)
at Microsoft AspNetCore,Diagnostics, ExceptionHandlerMiddlewarelmpl,<Invoke» g_Awaited|10_0(ExceptionHandlerMiddlewarelmpl middleware, HitpContext context, Task taski

[Attachment Removed]

Hi Taylor, thank you for the detailed report. I have raised an issue and will get this fixed.

Matthew

[Attachment Removed]