Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 5 down vote accepted

At least you can do

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

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.