current community

  • chat blog
    Super User
  • Meta Super User

your communities

Sign up or log in to customize your list.

more stack exchange communities

Stack Exchange
sign up log in tour help
  • Tour Start here for a quick overview of the site
  • Help Center Detailed answers to any questions you might have
  • Meta Discuss the workings and policies of this site
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.

Launching an app n minutes after boot up

up vote 3 down vote favorite
3

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!

mac boot
share|improve this question
asked Jun 2 '11 at 6:09
spacer
ceiling cat
5821618
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

1 Answer 1

active oldest votes
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" "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
edited Jun 2 '11 at 12:12

answered Jun 2 '11 at 9:31
spacer
Scott
4,1411826
    
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

Your Answer

 

Sign up or log in

Sign up using Google

Sign up using Facebook

Sign up using Stack Exchange

Post as a guest

required, but not shown
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 mac boot or ask your own question.

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.