-
Notifications
You must be signed in to change notification settings - Fork 102
Description
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