warning message before shutting down computer

I don’t want to change the default delay time before shutting down all the time, but on occasion I want it to be 10 seconds and still show the dialog.

The only documentation I could find was for scheduled shutdown, which is not useful in my case unless someone can show automation to get the current time and schedule it for now plus 10 seconds.

Is this doable with a tool or script to replicate the warning dialog and 10 second timer?

  • Is this a one time change you want to queue up with automation or are you looking to modify the system setting? It seems the steps to accomplish these would be quite different. – bmike Mar 30 at 11:17
  • More of a one time thing – Alice Mar 30 at 12:01
  • Perfect. I’ve tried to elaborate with an edit. I’m sure several options exist. Let’s see who has a handy script or thought. – bmike Mar 30 at 12:26

There are a couple of workarounds for this, one of which I discovered by accident some time ago - though it doesn't give you 10 seconds, it's almost instantaneous.

If you set a shortcut key for "Shut Down…" the Apple Menu will add another option, "Shut Down" [without the ellipsis]. This one doesn't present that dialog at all, it just shuts down.

The same applies to Restart…

enter image description here

enter image description here

You can achieve the same by holding Opt ⌥ whilst the Apple menu is open. All the options that would normally present an "Are You Sure?" dialog will be actioned without it - you see the ellipsis disappear with Opt ⌥ held.

  • Nice example. So we just need to wrap a 10 second timer dialog and then call this at the end? – bmike Mar 30 at 12:27
  • 1
    @bmike - tbh, I'm wondering if the 10s is some kind of XY Problem. If it's simply to enable/disable the 'reopen' checkbox, then the mouse is already right next to the Shutdown button. If that status doesn't need to be toggled, then the 'immediate' version eliminates the need to even mouse over to a dialog, or hit Enter. I'm almost certain that anything running at the point that dialog springs will already be in the list to reopen at next boot... so I can't figure what that 10s could be useful for. – Tetsujin Mar 30 at 12:46
  • I see it more like a language issue and that OP really wanted to ask one question - can I get a dialog that starts at 10, counts down and then restarts. They didn’t really care how we get them there. You just answered before I or someone else could clarify the question. See my edit there and the comments. – bmike Mar 30 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .