Launch app periodically with Automator
Solution 1:
You can also use AppleScript instead (/Applications/Utilities/AppleScript\ Editor.app/
).
The following script starts the Terminal.app every seven seconds:
on idle
tell application "System Events"
tell application "Terminal"
run
end tell
return 7
end tell
end idle
Save this script as an application and let it "stay open after run handler".
Solution 2:
Using launchd, you could save the property list below as ~/Library/LaunchAgents/com.stackexchange.apple.65970.plist
, and then load it with launchctl load ~/Library/LaunchAgents/com.stackexchange.apple.65970.plist
or by logging out and back in.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.stackexchange.apple.65970</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>-jga</string>
<string>Mail</string>
</array>
<key>RunAtLoad</key>
<true/> <!-- run before the first 15 minutes have passed -->
<key>StartInterval</key>
<integer>900</integer>
</dict>
</plist>
open -g
opens an application on the background, but it will still open a visible window if the application wasn't running before. -j
also hides the application if it wasn't running. It was added in 10.8 and is only shown in the help message.
You could also add a line like this to a crontab:
*/15 * * * * open -jga Mail