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

Mastering Matter: Seamless Smart Home Integration with Network Segmentation

I’ve been intrigued by the idea of integrating devices with Matter for some time. My smart home setup includes a pair of SwitchBot Hubs, som...