sleep timer on iTunes
i usually leave iTunes (mostly in radio mode, ’secret agent’ is an excellent station playing jazzy electronic stuff) running when i go to bed so i can listen to some music … the problem with that is that i want iTunes to stop playing music after i have fallen asleep. unfortunately there’s no sleep sensor on my iBook (yet), so i had to choose a time based solution: stop playing music after, say 30 minutes.
iTunes doesn’t have any sleep timer, but thank the apple god that we have a unix underneath, go to a shell:
ps ax|grep iTunes
gives me the process id (PID) for iTunes, and
sleep {milliseconds} && kill {iTunes PID}
stops the noise….
