Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I launch an app in Automator periodically, like in 15 minute intervals?

share|improve this question
up vote 2 down vote accepted

You can also use AppleScript instead (/Applications/Utilities/AppleScript\

The following script starts the every seven seconds:

on idle
    tell application "System Events"
        tell application "Terminal"
        end tell
        return 7
    end tell
end idle

Save this script as an application and let it "stay open after run handler".

share|improve this answer
Thank you, this helps! What happens if the app is already running and doing some work? Will it be interrupted? – Zoltán Matók Oct 2 '12 at 10:40
I tried your solution and it works, sort of... In the mac application I try to run I put an [NSApp terminate:self] method so that it quits itself after its job is done. When I run the script it successfully launches the applications and it will do its job and quit. When the script fires again it will throw a "connection is invalid" error, which as I read means that the script tried to communicate with an application that stopped running while the script was being executed. How can I avoid this? – Zoltán Matók Oct 2 '12 at 11:32
@ZoltánMatók I'm sorry, but I can't exactly follow the problem your describing. Why would the Apple Script fire this connection error? I've been using variations of this apple script for different applications without problems. So I'd expect the problem to lie within your described mac application. Maybe you should open a separate question on Stackoverflow? – gentmatt Oct 2 '12 at 13:35
Thanks, I did! Here's the link if you are interested… – Zoltán Matók Oct 2 '12 at 14:23
@ZoltánMatók Yeah, I found it already ;) I upvoted it as soon as I saw it. – gentmatt Oct 2 '12 at 14:27

Using launchd, you could save the property list below as ~/Library/LaunchAgents/, and then load it with launchctl load ~/Library/LaunchAgents/ or by logging out and back in.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN>
<plist version="1.0">
    <true/> <!-- run before the first 15 minutes have passed -->

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
share|improve this answer
Cool, this looks great. How would you get the app to quit after 5 minutes, then restart again? I'm asking about Launching Google Drive Sync Client for Mac. It uses a lot of memory. So I want to sync up, quit it, and then wait 30 minutes to re-do. – Ivanoats Jan 25 at 4:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.