[SCHEDULER-1900]  Fixed Time Plans - Several Problems
Type Bug
Priority High
Severity Major
Component Dispatch Scheduler Engine
Fixed In Version [9.19.1
Versions Affected [9.09.0
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 1/11/2023

Description
See this Comm Center thread by Grady Boyce. Fixed Time plans are listed as running even though their time has long been passed, and also when a new one is entered, it is listed as Running even though it isn't scheduled for this night.

Comments
7/7/2023 12:35:47 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 930
Affected files /trunk/Help/RelNotes.htm (Modified)
/trunk/Scheduler/Engine.cs (Modified)
Check-in comment Improve logging for cases where dispatcher started after a fixed time plan was scheduled. GEM:1900
7/6/2023 10:14:15 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 929
Affected files /trunk/Scheduler/AssemblyInfo.cs (Modified)
/trunk/Scheduler/Engine.cs (Modified)
Check-in comment Oops, plans deferred in previous fix need to be started. Was only starting pending ones. GEM:1900
7/6/2023 10:01:36 AM   Bob Denny
This caused a secondary issue. See this Comm Center thread by Grady Boyce. The fixed time plans that were  marked deferred now never came up in StartTimedPlans(). The effect was that a plan that is pending and ran on that same night would be OK, but any fixed time plans for a future night would be marked pending, and never run unless manually marked pending on their night.

Fixed in StartTimedPlans() by selecting both pending and deferred plans with run at time. The stored proc/query PendingPlansWithRunAtTime90 was replaced by a full select of Plans() and then filtering in the foreach loop to effectively get PendingOrDeferredPlansWithRunAtTime(). This should be added (or changed) in the database, but for expedience I did it in the code.
1/11/2023 4:40:37 PM   Bob Denny
9.1.0 Private Build installed on Boyce Astro SRO site (BARON).
1/11/2023 4:40:07 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/scheduler
SVN Revision 925
Affected files /trunk/Help/RelNotes.htm (Modified)
/trunk/Scheduler/AssemblyInfo.cs (Modified)
/trunk/Scheduler/Engine.cs (Modified)
/trunk/Scheduler/MainForm.cs (Modified)
Check-in comment Corrections and enhancement for fixed time plans. GEM:1900
1/11/2023 2:56:12 PM   Bob Denny
I got the "early start" issue cleared. Now, if the fixed time Plan is scheduled for a future night, it will be marked Deferred (until start time). Only on the night it is scheduled to run will it be started (at the beginning of the night).