I’ve been thinking more about leveraging the technology that surrounds me to automate aspects of my life. I decided that it would be nice to wake up to my iTunes music and/or streaming radio. A quick search brought up a number of programs that would do just that, but most of them were shareware, and would eventually ask me for money, and I’m kind of a do-it-yourselfer, at least when it comes to computer stuff. I’d played with Automater a bit, so I figured it couldn’t be that hard to automate something like that. Here’s what I did:
Open Automater. Click on iTunes and drag over a “Find iTunes Items” action.
Configure it to find the stuff you want to wake up to. Here’s where you can get creative. I have a playlist containing just a stream of our local NPR station, WBUR. So I set the action to “Find Playlists Whose Name Contains WBUR”. But you can also search for songs, based on name, genre, artist, album, or just about any other property.
Next drag over a “Play iTunes Playlist” action under the first action.
Save this both as a workflow, so you can edit it later, and an app, so it can be run.
Quit Automator and open iCal and create a new Event. Name it “Alarm Clock” or whatever.
Set the event to start at the time you want to wake up.
Under “Repeat”, choose “Custom” and enter the days that you want to be woken up. I set Monday through Friday.
Under “Alarm”, choose “Open File” and browse to the Automator app you just created, and set it to go off “0 minutes before”.
You can now close iCal and iTunes and Automator. When the alarm time comes, iCal will run in the background and open your app, which will open iTunes, find your chosen songs/playlists and start playing them.
I tested it out a few times on times a minute or two into the future and it worked, and then did a set-it-and-forget-it and it just woke me up this morning. I suppose I could add to it, letting it open my mail program, getting my morning mail, and a browser with the morning’s news and feeds. Might have to rig up an external port to my coffee maker…
If you wanted to get really hard core, you could go into the Energy Saver preferences and set your Mac to wake up every day just before the alarm is scheduled to run. That way you can even turn your Mac off at night and still use it as an alarm clock. It also guards against those middle-of-the-night power outages where you wake up to find your alarm clock flashing 12:00.