An iTunes timing question

Here’s my situation:
I usually go to bed every night at 12:30, after Jay Leno, and I listen to my iTunes stuff as I go to sleep. But, as it is now, my iBook is in my bedroom but I have to get out of bed to play the playlist. I’ve already been able to make a script that opens iTunes, and starts playing my playlist, but I can’t figure out how to make it play at 12:30 so I don’t even have to get out of bed (that’s what Applescript is for: automation).

I realize that when the script is saved as an app it would have to be set to stay open so that it can find out what time it is (that’s right, isn’t it?). But, I can’t seem to find anything on how to get the script to be checking the time.

Or, does anyone know of a good piece of software that sets applications to launch at specific times… That way I could set the software to run my current script…

Thanks in advance.

If your machine is not sleeping, you can use this:

set targetDate to date "miércoles, 22 octubre 2003 00:30:00"

on idle
	set currentDate to (current date)
	if currentDate is equal to targetDate or currentDate is greater than targetDate then
		--> your stuff here
	end if
	return 30
end idle

If it is sleeping, my favorite is iBeeZz: http://iBeeZz.reboute.net/

A cron utility may be a better choice to kick off a script.

Do you know if a cron task can run a script if the computer is “asleep”? (eg, iTunes receiving and responding to apple-events?)

Cron tasks will not run if the hard drive is spinned down (aka deep sleep).