How do you make iTunes stop within a certain timeframe?

Discussion in 'Mac Apps and Mac App Store' started by cleanair, Jan 14, 2016.

  1. cleanair macrumors regular

    Joined:
    Aug 13, 2015
    #1
    If you want to play music on iTunes while you fall asleep, but don't want it playing all night, how can you make it automatically stop after certain amount of time?
     
  2. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #2
    I'm sure someone can come up with a more user-friendly answer, but in Terminal:

    sleep 3600 && osascript -e 'tell application "iTunes" to pause'

    ...will tell iTunes to stop playing after one hour.

    A.
     
  3. cleanair thread starter macrumors regular

    Joined:
    Aug 13, 2015
    #3
    what if you want it to stop playing in 30 minutes?
     
  4. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #4
    The sleep number is seconds, so 60 seconds is one minute, 600 seconds is ten minutes, 1800 seconds is a half-hour.

    A.
     

Share This Page