Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution to the issue with Scheduled Installs #270

Open
TechTrekkie opened this issue Jan 15, 2025 · 3 comments
Open

Solution to the issue with Scheduled Installs #270

TechTrekkie opened this issue Jan 15, 2025 · 3 comments

Comments

@TechTrekkie
Copy link

TechTrekkie commented Jan 15, 2025

There is an issue that has been reported about Scheduled Installs not running at the date/time they are scheduled. I did some research and believe I have found the cause and solution.

in the #super script, Line 5360 , the calculation for determining the deferral_timer_scheduled_install_minutes is workflow_scheduled_install_epoch - workflow_time_epoch) / 60
I believe the problem is that the workflow_time_epoch appears to get set at the beginning of the runtime, and If the update takes time to download and prepare, and/or restart dialog is displayed for a user for a long period of time because they are either away or choose to ignore it, the time between those two epoch's grows, erroneously inflating the calculation. The WorkflowScheduledInstall datetime appears correct, but the NextAutoLaunch is inflated with

I added workflow_time_epoch=$(date +%s) above that line to set it to the current time, and that appears to calculate the proper deferral minutes.
I'm doing some additional testing but so far this looks to be the problem/solution.

i've attached a verbose log with the invalid calculation, and another verbose log from after adding that fix

superLogVerbose - invalid Deferral Minutes.log
superLogVerbose - Valid Deferral Minutes.log

@Rorzzer
Copy link

Rorzzer commented Jan 20, 2025

I think I'm seeing the same thing.
Super ran at 9:02, I scheduled the update for 13:03 (4 hours or 240 mins later) but Super deferred for 409 Minutes.

Mon Jan 20 06:13:08 Rory Powell super[90886]: **** S.U.P.E.R.M.A.N. 5.0.0 - macOS Sequoia Beta 15.3-24D5055b MINOR UPDATE VIA SOFTWAREUPDATE **** Mon Jan 20 06:13:08 Rory Powell super[90886]: Status: Previously downloaded macOS minor update is prepared: macOS Sequoia 15.3 Beta 3-24D5055b Mon Jan 20 06:13:08 Rory Powell super[90886]: Status: Focus days deadline of 2025-01-20 (1 day(s) after 2025-01-19:11:41) has passed. Mon Jan 20 06:13:08 Rory Powell super[90886]: Status: Soft days deadline of 2025-01-21 (2 day(s) after 2025-01-19:11:41) not passed. Mon Jan 20 06:13:08 Rory Powell super[90886]: Status: Hard days deadline of 2025-01-23 (4 day(s) after 2025-01-19:11:41) not passed. Mon Jan 20 06:13:08 Rory Powell super[90886]: IBM Notifier: User choice dialog with a 300 second timeout. Mon Jan 20 09:01:43 Rory Powell super[90886]: Status: User chose to schedule the installation. Mon Jan 20 09:01:44 Rory Powell super[90886]: IBM Notifier: User scheduled install selection dialog with a 300 second timeout. Mon Jan 20 09:01:44 Rory Powell super[90886]: IBM Notifier: Scheduled install selection starts at 2025/01/20 09:03:45 with a maximum end date of 2025/01/21 00:00:01. Mon Jan 20 09:02:14 Rory Powell super[90886]: Status: User chose to schedule installation for MON 2025-01-20:13:03. Mon Jan 20 09:02:14 Rory Powell super[90886]: Status: Scheduled installation on MON 2025-01-20:13:03, deferring for 409 minutes from now. Mon Jan 20 09:02:14 Rory Powell super[90886]: IBM Notifier: Scheduled installation warning dialog (this dialog has no timeout). Mon Jan 20 09:02:14 Rory Powell super[90886]: Exit: super is scheduled to automatically relaunch at: 2025-01-20:15:51:00 Mon Jan 20 09:02:14 Rory Powell super[90886]: **** S.U.P.E.R.M.A.N. 5.0.0 - EXIT CLEAN ****

@Rorzzer
Copy link

Rorzzer commented Jan 20, 2025

Specifically, where does 409 minutes come from? My calculation says it should be ~240 minutes.

Mon Jan 20 09:02:14 Rory Powell super[90886]: Status: Scheduled installation on MON 2025-01-20:13:03, deferring for 409 minutes from now.

@TechTrekkie
Copy link
Author

I included the explanation in the original post. Its the difference between the time the script started and the time the scheduled restart was submitted.

Ex: You scheduled the restart to be 4 hours ahead (240 mins) but the amount of time between the actual script starting and you scheduling the restart was 169 minutes, totaling 409 minutes. Could be a combination of the time it took the update to prepare and how long the restart dialog displayed before the schedule restart button was clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants