Friday, March 9, 2007

Scheduled Launching/Quitting Applications


On our Mac mini, I wanted to schedule an application to launch in the morning, and quit at night.  I was able to pretty easily configure launchd and AppleScript to do this.


For example, if I wanted to launch TextEdit, I would create these AppleScripts, and saved them as applications.


tell application "TextEdit"
    activate
end tell



tell application "TextEdit"
    quit
end tell





Then, I scheduled these applications to be launched at the specified time with launchd using Lingon.

No comments:

Post a Comment

Seamless Local Control: Integrating WeatherFlow with Home Assistant Across VLANs

I've been pleased with my Home Assistant setup for some time now. One of my main focuses has been achieving local control. This ensures...