MacOS – automate app launch at midnight

applescriptautomatoritunesmacos

How might I use Automator or Applescript to launch iTunes at midnight, and kill it at 5am ?

(This is the only time when I have unlimited bandwidth.. rural sat-based ISP.. ugg.)

Thanks.

Best Answer

This is the easiest, non-technical, method:

(I'm on Snow Leopard, I've edited these to match Mavericks - the exact buttons to click may be wrong)

  1. Make an Applescript and type this: tell application "iTunes" to activate
  2. Open Calendar.app
  3. Make a new event today for 00:00
  4. Set it to repeat every day
  5. Alert should be Open file. Select Other > find the applescript you just made
  6. Make an Applescript and type this: tell application "iTunes" to quit. Save it somewhere
  7. Make another event tomorrow for 05:00
  8. Set it to repeat every day
  9. Alert should be Open file. Select Other > find the applescript you just made

Done!

The calendar app does not have to be running to allow the events to take place.