Just noticed something, not sure if by design or bug...
I know JSS is smart enough that if, say, a "sudo jamf policy" will execute multiple policies one or more of which may require a restart, it waits and only restarts once at the end of all the policy executions. But it appears that whichever policy it executes last (and we have little control of the order), when the "Creating Reboot Script..." step occurs, it uses the Delay value of that particular policy, even if the package or update in the policy doesn't require a restart.
Since that might be difficult to parse, even for the person writing it, to illustrate:
Policy A installs A.pkg, which requires a restart. Policy A's restart delay is set to 15 minutes.
Policy B installs B.pkg, which does not require a restart. Policy B's restart delay is the default 5 minutes.
Both policies are set to "Restart if a package or update requires it" and scoped to a computer that, when "sudo jamf policy" is run, happens to execute A first then B. The expected result, in my opinion, is that after B runs a restart prompt for 15 minutes will pop up. Instead a restart prompt for 5 minutes appears.
Has anyone else seen this? The reason I caught this is because in our environment all of our policies that we think may require a restart (think Apple Software Updates) are set to a 15 minute restart delay, but I noticed that after one of those policies executed, I was prompted that my computer would restart in 5 minutes, because other policies were also executed at the same time that had the default 5 minute delay, even though the packages in those other policies didn't require restarts.
Since all new policies has the Restart Options payload added by default with "Restart if a package or update requires it" for both if user is logged in or not, and a default delay of 5m, this is a potential headache. If I want to avoid this issue from happening, I'd have to remember to remove the Restart Options payload from every policy that doesn't need it.
