Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
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 '11 at 6:16

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer
    
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 '11 at 9:44
    
@Daniel Beck I thought that was a feature, rather than a bug. :-P –  Scott Jun 2 '11 at 9:55
    
launch app "<app name>" to open in the background. –  ؘؘؘؘ Jun 2 '11 at 16:52
    
awesome, thanks! –  ceiling cat Jun 3 '11 at 1:12

Scott's answer unfortunately doesn't work on newer version of OS X. Version below version 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 extension plist – in ~/Library/LaunchAgents/. Name could be for example com.yourname.delayed.start. (Don't forget to append .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 as Label should be the same as filename (but without the extension – .plist)

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

share|improve this answer

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.

share|improve this answer
    
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 at 16:10

Your Answer

 
discard

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.