How To Set an Alarm On a Mac

While there is no Clock app on a Mac yet, you can use the Calendar to set an alarm for any time on any day. By adding an Automator script, you can have that alarm play a sound at full volume or speak some text.



Here is the code for the script:

function run(input, parameters) {

	let app = Application.currentApplication()
	app.includeStandardAdditions = true
	let originalVolume = app.getVolumeSettings().outputVolume*7/100
	app.setVolume(7)
	
	app.displayNotification("Alarm Clock", { soundName: "Rooster" })
	delay(3)
	
	app.setVolume(originalVolume)
}

Comments: 5 Responses to “How To Set an Alarm On a Mac”

    Kathy
    3 years ago

    Hi Gary, that was brilliant and so much fun to do. Thank you for all your excellent video tutorials.

    Ana Vargas
    3 years ago

    Hello, I am copying the code for the script, but I would have to edit out the "rooster" sound, since I don't have that in my computer. I am copying and pasting the one sound I have downloaded to my Mac, and it doesn't work :(

    3 years ago

    Ana: Just make sure you put the sound in the right place and the name matches exactly. And make sure it is the right format too.

    EDGARD DE OLIVEIRA WESTIM PERRI
    3 years ago

    How to use scripts for automator using your scripts with simple copy and paste?

    3 years ago

    Edgard: Watch the video and see how I do it.

Comments Closed.