3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

iTunes Alarm Clock

iTunes Alarm Clock
«
  • IMGP4950.JPG
  • IMGP4954.JPG
I'm a deep sleeper and I can learn to sleep through any alarm that just beeps, so I wanted wake up to my music instead - dynamic, melodic, pleasant, and I can change it every day. Since all my favorite music is on my computer, I can pick the most pleasant sound to wake up to (Jolie Holland singing "Sascha", or the opening to a Toots and the Maytals concert, or U2 singing "Beautiful Day". I still sleep through the Beatles' "Here comes the sun").

The fact that I can listen to my own music makes this wayyy better than a clock radio.

I've been using this since I was ~12 or so. That's a lot of mornings spent reliability-testing this alarm clock by waking up on time for school, work, etc., until the advent of the Sunshine Alarm Clock I built last year.

*nix users can apply this easily to xmms (I've done it, it works). Windows users, switch to a better operating system, or hang on to your seats and maybe you'll one day be able to script your OS. These directions are for Mac OS/iTunes users.

thanks to Rachel Darman for the photos!
 
Remove these adsRemove these ads by Signing Up
 

Step 1Cron

Cron
Cron is a utility that makes something happen at a specific time. (think Chronos, the greek god of time)

Here's what you do:

Get into your root-suit by typing "sudo", and sic your favorite text editor on /etc/crontab.
That is, run "sudo emacs /etc/crontab" at the command prompt.

If your crontab is pristine, you should see the first image.

Allow me to explain what all this means.

"# minute hour mday month wday who command"

These are column headings, like in a table. Just insert the time you want into the row below, your username, and the command.

You can add any number of rows. The "command" line will be run verbatim, just as if you were typing it onto the command line.

If a particular time doesn't matter, use a * (wildcard).

For example, if you only specify a minute (e.g., "15"), and fill in the rest of the colums with '*'s, that command will run every hour on the 15 minutes.

If you put a * for the minute, the command will run every minute. It's rare that you'd want to do that, unless for some kind of prankery.

mday is a particular date (e.g., "14" to run on the 14th of every month), wday is a day of the week (0-6, e.g, "0" for Sunday).

Dig it a lot? Learn more by running "man crontab" and "man cron" at your terminal.


« Previous StepDownload PDFView All StepsNext Step »
14 comments
Feb 5, 2011. 8:07 PMstingerbee says:
Thanks! There's also an app. called iTunes Alarm. It's very easy to use. It uses music (sound files) in the iTunes library for sound/music alarms and allows multiple alarms to be set and saved for future use. It's posted at: http://www.johnnarun.com/itunes_alarm/
Mar 19, 2009. 7:38 PMWhoTookMudshark says:
People are being really snippy in your comments! I feel like I should point out that I am not one of the snippy ones when I ask this:

In Step 4, is "9 * * * * stasterisk osascript -e 'tell app "iTunes" to play playlist "Coffee"'" the proper syntax for 9:00am? I thought it would be "0 9 * * *" instead but I am worried that I am misunderstanding.
Jun 19, 2009. 7:56 PMCrucio says:
No, you're right. Star goofed that in a couple places. What she has will wake her on the 9th minute of every hour every day. :D Star: I've done something similar with a combination of Solaris (then Linux), xmms, x10 (with heyu), and wireless speakers. x10 switches the speakers on and off, and I use a table-top X10 controller with some scripts to tell the computer I've woken up or that I want to snooze. I've been bitten by the system, like you have, though. (Power outages, usually, or forgetting to re-enable the system after coming back from vacation.)
Mar 20, 2009. 10:09 PMYerboogieman says:
You look like my friend Ichika.
Oct 12, 2008. 5:40 PMlightpacker says:
Windows Users don't have to spend their time typing script just download Music Alarm Clock v2

http://www.mediafire.com/?wbozmnk2m3d

and it always goes off =]
Dec 9, 2008. 4:50 AMdombeef says:
You made it in oct. 2008
Mar 19, 2009. 7:47 PMWhoTookMudshark says:
She explained it in 2008.
Oct 12, 2008. 6:53 PMLinuxH4x0r says:
Actually there is a premade version. I know it exists but I forgot the name.
Oct 24, 2010. 7:40 PMfeltonite says:
There's "Alarm Clock," written by Robbie Hanson, which I use.
Dec 9, 2008. 7:59 AMmitchell12 says:
windows can't script? Umm never heard of a batch file?
Oct 12, 2008. 7:19 PMcanida says:
Uh-oh, who let Tim get his hands on a hedge trimmer?!?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
199
Followers
46
Author:stasterisk
Hi! I'm Star Simpson! I'm a real me! See more at [http://stars.mit.edu stars.mit.edu]. photo by [http://bea.st/ Jeff Lieberman] (http://bea.st) stasterisk - my name is Star, and when I wa...
more »