Where do we put an app after i pressed shutdown

I watched this youtube vid:https://www.youtube.com/watch?v=u78KDs_Ho7M

soo i saw them coded the app to run and played the sound, so i currently have my sound app and i dont know where to put this for it to run when i press shutdown on my mac, can i just coded in terminal?


Posted on Mar 6, 2025 8:18 AM

Reply
2 replies
Sort By: 

Mar 30, 2025 5:07 PM in response to Doesappleallowit

The instructions in the video are for playing a sound when you log into your macOS user account. It does not get played when you shutdown the Mac.


As the person in the video said, you can name the Automator script whatever you want. You save/store it within your home user folder like you do any other document you create or edit.

Reply

Mar 31, 2025 10:47 AM in response to Doesappleallowit

There is no built-in mechanism for executing a script at shutdown.


Your option likely is going to need to approach this differently - namely have a background process start automatically and sit around idle, waiting for a TERM or KILL signal (indicating that the OS is shutting it down), then you can jump in with your sound before it quits.


Note that without some serious shenanigans (namely, writing your own Swift-based app), your script won't be able to tell the different between 'Shut down', 'Restart', or even 'Log out' - all of these would trigger the app to quit and it wouldn't necessarily know why.

Reply

Where do we put an app after i pressed shutdown

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.