Announcement

Collapse
No announcement yet.

v3.0.0.42 Trouble setting a weekly schedule when it crosses Sunday into Monday

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    v3.0.0.42 Trouble setting a weekly schedule when it crosses Sunday into Monday

    I just started configuring schedules today but have hit a bit of a speedbump.

    Is there anything wrong with either of these schedules? The only difference between them is in red.

    [Sun Sunset;Mon 01:45],[Mon Sunset;Tue 01:45],[Tue Sunset;Wed 01:45],[Wed Sunset;Thu 01:45],[Thu Sunset;Fri 01:45],[Fri Sunset;Sat 01:45],[Sat Sunset;Sun 01:45]

    [Mon Sunset;Tue 01:45],[Tue Sunset;Wed 01:45],[Wed Sunset;Thu 01:45],[Thu Sunset;Fri 01:45],[Fri Sunset;Sat 01:45],[Sat Sunset;Sun 01:45],[Sun Sunset;Mon 01:45]

    Both of them result in the following error...

    ERROR System.FormatException: end time Mon 01:45 cannot be before start time Sun Sunset at HSPI_EasyTrigger.WeekScheduleTimeSlot.Parse(String s) at HSPI_EasyTrigger.WeekSchedule.SetTimeSlots(String timeSlots)


    If you look at the GUI editor for schedules Monday is the start of the week rather than Sunday which is more common for my location in the USA. In that literal view I can see how Monday's off time is "before" Sunday's on time. I suspect if the start of the week in the viewer was Sunday I'd run into the same problem for any time in the schedule that crossed Saturday into Sunday.

    Click image for larger version

Name:	schedule.PNG
Views:	1
Size:	31.4 KB
ID:	1211814

    I haven't tried it yet, but I'd prefer not to have negative schedules based on the sun being up and keeping lights off during that time.

    #2
    Originally posted by scorp508 View Post
    I just started configuring schedules today but have hit a bit of a speedbump.

    Is there anything wrong with either of these schedules? The only difference between them is in red.

    [Sun Sunset;Mon 01:45],[Mon Sunset;Tue 01:45],[Tue Sunset;Wed 01:45],[Wed Sunset;Thu 01:45],[Thu Sunset;Fri 01:45],[Fri Sunset;Sat 01:45],[Sat Sunset;Sun 01:45]

    [Mon Sunset;Tue 01:45],[Tue Sunset;Wed 01:45],[Wed Sunset;Thu 01:45],[Thu Sunset;Fri 01:45],[Fri Sunset;Sat 01:45],[Sat Sunset;Sun 01:45],[Sun Sunset;Mon 01:45]

    Both of them result in the following error...

    ERROR System.FormatException: end time Mon 01:45 cannot be before start time Sun Sunset at HSPI_EasyTrigger.WeekScheduleTimeSlot.Parse(String s) at HSPI_EasyTrigger.WeekSchedule.SetTimeSlots(String timeSlots)


    If you look at the GUI editor for schedules Monday is the start of the week rather than Sunday which is more common for my location in the USA. In that literal view I can see how Monday's off time is "before" Sunday's on time. I suspect if the start of the week in the viewer was Sunday I'd run into the same problem for any time in the schedule that crossed Saturday into Sunday.

    [ATTACH]65256[/ATTACH]

    I haven't tried it yet, but I'd prefer not to have negative schedules based on the sun being up and keeping lights off during that time.
    I think Spud said it was a .net limitation preventing crossing midnight on Sunday, so you have to break Sunday evening and Monday morning into two time spans:

    [Sun Sunset-00:30;Mon 00:00],
    [Mon 00:00;Mon Sunrise+00:30],
    [Mon Sunset-00:30;Tue Sunrise+00:30],
    [Tue Sunset-00:30;Wed Sunrise+00:30],
    [Wed Sunset-00:30;Thu Sunrise+00:30],
    [Thu Sunset-00:30;Fri Sunrise+00:30],
    [Fri Sunset-00:30;Sat Sunrise+00:30],
    [Sat Sunset-00:30;Sun Sunrise+00:30]

    Above you can see that Tue-Sat all work, but Sunday needs to end at midnight and Monday needs to begin at midnight.
    Last edited by randy; December 19, 2017, 12:44 PM. Reason: typo
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Thank you, Randy, this was the tip I needed and got me where I wanted it to be.

      Comment

      Working...
      X