I think the scheduler has an issue. When I schedule a job, it goes to sleep, but when the time comes, it just logs "Scheduler is awake. Jobs shall be started when ready..." but nothing happens
2021-06-23T22:33:00 Scheduler is awake. Jobs shall be started when ready... 2021-06-23T21:29:04 Sleeping until observation job NGC 7023 is ready at Wed Jun 2322:33:00 2021... 2021-06-23T21:29:02 Scheduler started.
The KStars log says:
[2021-06-23T22:33:01.044 EDT INFO ][ org.kde.kstars.ekos.scheduler] - "Scheduler is awake. Jobs shall be started when ready..."
[2021-06-23T22:33:02.046 EDT DEBG ][ org.kde.kstars.ekos.scheduler] - "Checking Startup State (0)..."
[2021-06-23T22:33:02.046 EDT DEBG ][ org.kde.kstars.ekos.scheduler] - Startup Idle. Starting startup process...
[2021-06-23T22:33:02.047 EDT DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI Properties...
[2021-06-23T22:33:03.047 EDT DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI properties.
[2021-06-23T22:33:03.047 EDT DEBG ][ org.kde.kstars.ekos.scheduler] - Mount unpark required but mount is not yet ready.
BUT, the mount is already unparked, and UNPARK mount is checked...
"Mount is not ready" seems to point to a d-bus issue with the Mount module, which reports as not connected. Could we have a race condition after connecting Ekos to INDI?
IDK what race condition means, but what I can say is that I solved this situation by:
1. Parke the mount
2. Restart EKOS
3. Load the scheduler job and run it
I can confirm a similar bug that hit me a few days ago. Scheduler finished a job, and then slept for the next day. I let it run all day, when the time came, KStars crashed in scheduler.cpp becuase currentJob was nullptr. I think that happens due to observatory shutdown procedure which closed the roof...etc, and when it came time to run it again, it crashed.
Maybe when using preemptive shutdown, we shouldn't reset currentJob to nullptr in Scheduler::stop() ?