Schedule Launch & Quit of Apps

Discussion in 'macOS' started by swwack91, Jan 9, 2013.

  1. swwack91 macrumors 6502a

    Joined:
    Jan 28, 2007
    Location:
    New Jersey
    #1
    Hi all,

    Is there an easy way to automate (on certain days of the week) certain apps launching and then quitting after a certain time?

    To be specific, I want an app to automatically open at 6am on weekdays and then automatically quit at 7pm.

    Thanks for any tips!
     
  2. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #2
    You can launch apps and files from iCal, as an "alarm" to an event.
    To Quit, you could run an AppleScript to send a Quit message to the app, and run that at the appointed time.

    Otherwise, you need to setup a LaunchDaemon. The easiest way to do this is using Lingon, an app on the App Store. Or you need to write your own XML file to the correct parameters.
     
  3. swwack91 thread starter macrumors 6502a

    Joined:
    Jan 28, 2007
    Location:
    New Jersey
    #3
    What about quitting? Do either of these options support closing apps as well?
     
  4. switon, Jan 9, 2013
    Last edited: Jan 10, 2013

    switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #4
    RE: cron...

    Hi swwack91,

    ...just another suggestion...

    Of course, there is the antiquarian Unix method of "cron" which still exists in the Mac OS I see. This allows you to setup any schedule you want for doing any number of things periodically on your machine, including killing other processes at given times. If /etc/crontab exists, then launchd will launch cron to take care of the cron jobs (no messing with XML is required).

    (Edit: removed irrelevant information...)

    Regards,
    Switon
     
  5. swwack91 thread starter macrumors 6502a

    Joined:
    Jan 28, 2007
    Location:
    New Jersey
    #5
    Hm... thanks for the suggestion but I think a lot of that is over my head. I was hoping that there'd be a way to do it without any scripting since that's really not my strength.
     
  6. swwack91 thread starter macrumors 6502a

    Joined:
    Jan 28, 2007
    Location:
    New Jersey

Share This Page