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
add comment

1 Answer

up vote 3 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. –  Lri Jun 2 '11 at 16:52
    
awesome, thanks! –  ceiling cat Jun 3 '11 at 1:12
add comment

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.