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.

I have been spending way too much time trying to figure this one out. My launchd job keeps giving me the error "Exited with code: 1". Here is the plist:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.brettterpstra.Slogger</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/bin/ruby</string>
            <string>/Users/kris/Dropbox/Slogger-Main/slogger</string>
            <string>-s</string>
        </array>
        <key>StartCalendarInterval</key>
        <dict>
            <key>Hour</key>
            <integer>6</integer>
            <key>Minute</key>
            <integer>31</integer>
        </dict>
    </dict>
</plist>

I wonder if this has something to do with my ruby install? However, I did confirm that ruby is found in /usr/bin and the error doesn't indicate that the file or folder cannot be found, as I have seen in the past. The file does not require admin rights to run, and I am able to run the file manually from Terminal with ./slogger. There is a lot that I have not learned yet about these things, but I am stumped, and I have spent way too long trying to solve this.

Any help is appreciated!

share|improve this question
    
Without knowing anything about the slogger script, it's very hard to make suggestions. A couple of things come to mind, though: does the script (or ruby itself) depend on any environment variables (that launchd won't have set)? Also, you can add the StandardOutPath and StandardErrorPath keys to the .plist to see what the script is outputting before it exits (see this previous answer). –  Gordon Davisson Nov 4 '13 at 19:57

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.