When you shut down OS X, the system will first attempt to quit all open applications smoothly and then proceed with the shutdown; however, if a program takes too long to quit, then it may halt the shutdown process and issue a warning that the program has prevented the system from shutting down. While this usually just requires you to quit the program manually and save your data, at times it can be frustrating to deal with, especially if some programs simply take a while to quit.
MacFixIt reader Frida recently wrote in with such a problem:
Several applications, particularly Creative Suite components take longer to quit than the shutdown time-out requires. By the time the message displays that "Your computer didn't shut down because xxx didn't quit," that application has quit. I have to click shutdown again, and once again another Adobe app doesn't quit in time. I see this behavior on 3 systems, two running 10.4.11 and another running 10.6.9. Is there a way to lengthen the time-out so I can actually walk away from my computer?
This problem may happen more with older systems that are used for computationally demanding and high-resource-using tasks, or those that need to wait for external conditions such as peripheral devices to be ready, or a network communication to be managed.
Unfortunately there is no easy way to adjust the time-out period that OS X uses before canceling any log-off or shutdown event, so if you find yourself in this situation, then you can use Apple's Automator utility to create a service to use instead of the default Shutdown command in the Apple menu, which will first quit all applications and then wait a short period so your applications will quit, before shutting the system down. To do this, open Automator and then follow these steps:
- Create a new Service workflow and set the service to receive "No Input" in "Any Application" (done using the menus at the top of the workflow).
- Drag the Quit All Applications action and then the Pause action to the workflow so they are sequential. Set the Pause action to the number of seconds or minutes you would like to ensure that all programs quit before the workflow continues.
- Now drag the Run AppleScript action to be the final one in the workflow, and replace the "(* Your script goes here *)" text with the following script that will instruct the system to shut down:
tell application "System Events"
(NOTE: While you can instead use a shell script to run the command "shutdown -h now," this approach is not the cleanest way to exit programs and may result in problems with programs saving documents and settings when the system shuts off.)
When finished, save the workflow with a name such as "Delayed Shutdown" and it will be available in the Services submenu of the Apple menu. You can also go to the Keyboard system preferences and locate the new service in the Services section of the Keyboard Shortcuts tab, where you can assign the service a custom hot key so you can invoke the shutdown from a key press instead of having to use the Apple menu.