How to Play a Song in iTunes at a Specific Time Every Day

You can use Power Manager to automatically play a song at a specific time each day. You can also create multiple events to play different songs at different times or on different days.

iTunes is included with Mac OS X

Let's walk through how to create an event to launch iTunes and to ask it to start playing a song. The event will use a short AppleScript to interact with iTunes. Power Manager will deal with ensuring the AppleScript is performed at the right time; Power Manager will even wake a sleeping Mac beforehand, if needed.

Create a Scheduled Song Play Event

  1. Launch System Preferences and select Power Manager.
  2. Click Add� to create a new event.
    Click Add to create a new event in Power Manager.
  3. Choose the template Run a script daily.
    Select the Run a script daily task.
  4. Click Continue to the Script step.
  5. Copy and paste the following AppleScript into Script to run:
    #!/usr/bin/osascript
    
    tell application "iTunes"
        activate
        play track "Annie Mac mix"
    end tell

    You will need to change the name of the song to play. In this example, the song is called "Annie Mac mix".

    Copy and paste in the AppleScript snippet.
  6. Click Continue to the When step.
  7. Adjust the time and days to read 07:00, with every day of the week selected.
    Adjust the time and days to play the song.
  8. Continue through the remaining steps until your event is created.
    Your song is now scheduled and ready to play.

With these steps completed, Power Manager has created a single event. This event will launch iTunes at 07:00 every day and play the choosen song. The event will also wake up the Mac, if it is sleeping.

The event appears in the Power Manager status menu.

This event has on-demand behaviour. This behaviour means it can be triggered immediately using the Power Manager status menu and through Power Manager Remote.

The event appears in Power Manager Remote on an iPhone.

To turn your Mac into an alarm clock, consider adding a power on event a moment or two before this event is triggered. With these two events in place, you could power down your Mac at night to save energy. In the morning your Mac would power itself on in time to play your song.

This article was posted in , , , , and and tagged , , , and .

Published by Graham Miln on