Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know I can do sleep $[60*60*8]; open alarm.mp3 but is there perhaps a better way?

share|improve this question
Any specific reason it needs to be command line controllable? Or is a GUI app with AppleScript (osascript) good enough? – Chealion Aug 18 '10 at 5:38
up vote 6 down vote accepted

At least you can do

user@host:~$ at hh:mm
> /usr/bin/open alarm.mp3

which will make constantly opened terminal window unneeded.

share|improve this answer
This doesn't seem to actually work in Mac OS X. In fact, at doesn't seem to work at all. The command is added to atq, but never actually run. – ShreevatsaR Oct 30 '11 at 12:21
@ShreevatsaR, generally, it requires a working atd on *nix. I have never touched OS X myself, through. – whitequark Oct 30 '11 at 20:45
Ah ok, my previous comment was wrong... what it needs is the full path to open. Using /usr/bin/open works. (Actually since that starts iTunes by default, I used /usr/bin/afplay which ships with OS X.) – ShreevatsaR Oct 31 '11 at 1:17
@ShreevatsaR, sox is also quite good if you need a bit more than just playing. I guess it's available with Homebrew. – whitequark Oct 31 '11 at 5:51
Simple and efficient. Works on OS X, you have to start the atrun daemon though. See man atrun. – polym Jul 3 '15 at 15:27

You must log in to answer this question.

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