https://bugs.kde.org/show_bug.cgi?id=527026
Bug ID: 527026
Summary: Summary: Scheduler: misleading "cannot run because:
twilight" when no job can be scheduled
Classification: Applications
Product: kstars
Version First 3.8.5
Reported In:
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
----- Description -----
When no job is runnable, the Scheduler prints a diagnostic for several time
slots before
"Sorry, no jobs are runnable for the next 3 days." In practice it reports a
wrong reason.
Example from a real night: a single job was aborted at 00:07 because autofocus
failed, with the
error handling strategy set to "None" (don't re-schedule). The log then showed:
(1) Job NGC 7635: cannot run because: twilight
***************** In 20 Hours ******************
(1) Job NGC 7635: cannot run because: twilight
...
(1) Job NGC 7635: cannot run because: twilight
******************** Now ********************
Sorry, no jobs are runnable for the next 3 days.
"Now" was midnight, in astronomical night, and the target was well placed. The
real reason is
that the job was aborted and aborted jobs are not rescheduled. This sent us
looking for a
twilight setting problem instead of the error handling settings.
CAUSE
In GreedyScheduler::scheduleJobs() (kstars/ekos/scheduler/greedyscheduler.cpp):
1. QString reason is declared once outside the loops and never reset, while
getNextEndTime()
only sets it when a constraint is violated. The first slot evaluated ("In 20
Hours", i.e. the
next evening) really is in twilight; every later slot without a violation
reports that stale
value.
2. The diagnostic only evaluates sky constraints. It ignores allowJob(), so
aborted/failed jobs
that the error handling settings exclude are reported with a sky constraint
instead.
FIX
A merge request on invent.kde.org reports the error handling reason for those
jobs ("it was aborted and aborted
jobs are not rescheduled" / "it failed and errors are not rescheduled"), and
uses a fresh reason
per evaluation, printing "no constraint violated" when getNextEndTime() finds
none.
Compile-checked against master (e8e91446, 2026-10-13). Merge request: (link to
be added)
SOFTWARE/OS VERSIONS
Seen with KStars 3.8.4 and 3.8.5 (Flatpak, org.kde.kstars stable), code
unchanged in master as
of 2026-10-13. Linux (Kubuntu).
--
You are receiving this mail because:
You are watching all bug changes.