7

Is there is way to make an app launch n minutes after boot up? There are a few apps that I want to launch and but not at start time (using login items) because it slows down boot time (e.g. Dropbox). Ideally I can make it like 10 minutes after launch. Thanks!

1
  • 1
    Write an applescript that starts the things you want started, put in a 10 minute delay as the very first thing. Schedule your script to run at login.
    – Zoredache
    Jun 2, 2011 at 6:16

3 Answers 3

6

Not directly, but you can do much the same thing by starting a script that will wait ten minutes, then launch the application. For example, with an AppleScript:

delay 600 --600 seconds == ten minutes

tell application "Dropbox" to activate
tell application "Something Else" to activate

Open AppleScript Editor in /Applications/Utilities and type this in. Then, save it as an Application, and add that Application to your log in items.

This will start the application(s) ten minutes after you log in rather than after when you start up, but your question suggests that you're automatically logging in on start up anyway. Starting Mac GUI applications genuinely on startup tends to not work.

[edit]Per Daniel Beck's suggestion, here's a way to do this silently:

Create the AppleScript described above, but save it as a script. Then create a Launchd property list. If you've installed the Mac OS X dev tools, you can use the Property List Editor that's included with them, or you can use a text editor (as it's XML). Create the following:

<?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>some.meaningful.name</string>

    <key>OnDemand</key>
    <false/>

    <key>ProgramArguments</key>
    <array>
        <string>osascript</string>
        <string>/path/to/your/applescript.scpt</string>
    </array>

    <key>KeepAlive</key>
    <false/>
</dict>
</plist>

Save this in ~/Library/LaunchDaemons/some.meaningful.name.plist. Then when you log in, your AppleScript will be run, though it will not provide an icon on the dock, which would allow you to cancel.

3
  • This will run an application that appears in the Dock and can be interrupted deliberately or by accident. Isn't there a better way?
    – Daniel Beck
    Jun 2, 2011 at 9:44
  • @Daniel Beck I thought that was a feature, rather than a bug. :-P
    – Scott
    Jun 2, 2011 at 9:55
  • launch app "<app name>" to open in the background.
    – Lri
    Jun 2, 2011 at 16:52
3

Scott's answer unfortunately doesn't work on the newer versions of OS X. The version below has worked for me on Yosemite.

Firstly, remove the app from Login Items (System Preferences -> Users & Groups). But even if you do that, some apps (e.g. Dropbox), will add itself to Login Items again. So you also have to disable autostart in your app.

Then, as Scott has written, create an AppleScript script like this:

delay 600 --600 seconds == 10 minutes

tell application "Dropbox" to activate
tell application "Something Else" to activate

Now you have to create a Launch Agent – just a file with the extension plist – in ~/Library/LaunchAgents/. The name could be for example com.yourname.delayed.start. (Don't forget to append the .plist)

<?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>name</string>

    <key>ProgramArguments</key>
    <array>
        <string>osascript</string>
        <string>/path/to/your/applescript.scpt</string>
    </array>

    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

name (the value of Label) should be the same as filename (but without the extension – .plist)

And that's all, the next time you login, apps you have specified in your script should launch after 10 minutes.

0

There's an app called Soluto that (among other things) will allow you to delay an item's startup. https://www.soluto.com/

It will also show you a comprehensive list of startup items and will make recommendations for each: enter image description here

I've only tried this on my PCs but they do have Mac support.

2
  • Whoever voted this down - can you add a comment so I know how to improve the answer? I'm just trying to help...
    – RussellZ
    Jul 16, 2015 at 16:10
  • Just a note: as of 2018 this link goes to an event planning company and no longer to an app.
    – bdecaf
    Feb 5, 2019 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .