You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks again for the during implementation for the time range. However recently we've stumbled into issue where user defined a time range to run scheduled events to run during 11:00 pm-5:30 am. This call fails to run and it'll run indefinitely:
One way to cater is calling two separate queries and merge both arrays of events but it's a better idea if montrose gem can solve this issue instead of patching it. Is it possible?
The text was updated successfully, but these errors were encountered:
A bit old, but here is a workaround by splitting it on midnight and building a schedule. I leave the split logic for others to implement as not sure the best way to do it offhand.
options = {... , during: "11:00 pm-5:30 am", ...}
Montrose::Schedule.build do |s|
during_split_midnight(options [during').map do |during|
options[:during] = during
s << Montrose.r(options)
end
end
during_split_midnight just splits it into start to midnight and midnight to start as an array, if the range passes midnight, else it returns [during]
Hi, thanks again for the
during
implementation for the time range. However recently we've stumbled into issue where user defined a time range to run scheduled events to run during 11:00 pm-5:30 am. This call fails to run and it'll run indefinitely:One way to cater is calling two separate queries and merge both arrays of events but it's a better idea if montrose gem can solve this issue instead of patching it. Is it possible?
The text was updated successfully, but these errors were encountered: