3

I'm writing my first launchd plist. When I try to load it with the following command:

$ launchctl load com.Test01.plist
  launchctl: no plist was returned for: com.Test01.plist nothing found to load

The plist is supposed to execute a shell command which writes the date to a file. The plist file follows. It is in ~/Library/LaunchdAgents.

The hardware is a MacBook Air 11 running OS X 10.8.4 Thanks for any comments.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Aple//DTD PLIST 1.0//EN">
<plist version="1.0">
<dict>
    <key>label</key>
    <string>com.Test01</string>

    <key>ProgramArguments</key>
    <array>
            <string>/Users/cae/scripts/testcron.sh</string>
    </array>

    <key>RunAtLoad</key>
    <true/>

    <key>Nice</key>
    <integer>1</integer>

    <key>StartInterval</key>
    <integer>60</integer>

    <key>StandardErrorPath</key>
    <string>/Users/cae/tmp/Test01.err</string>

    <key>StandardOutPath</key>
    <string>/Users/cae/tmp/Test01.out</string>
</dict>
</plist>
2
  • plutil helped me out thanks to this SO answer Commented Jan 29, 2015 at 3:58
  • 1
    @kenorb Mentioned in the comments is that plutil doesn't report this as an error, so I don't think this is a duplicate.
    – grg
    Commented Jan 12, 2018 at 9:01

1 Answer 1

6

That error is usually shown when there is a syntax error when checking with plist command.

In this case:

  • label should be Label,
  • and:

    <!DOCTYPE plist PUBLIC "-//Aple//DTD PLIST 1.0//EN">
    

    should be:

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    
2
  • 1
    Thank you Lauri, capitalizing "Label" solved my issue. One comment: plutil doesn't seem to detect this kind of error, because when checked with it, it reports "ok" with both versions of my script. Again, thanks for the help.
    – Carlos
    Commented Jul 18, 2013 at 12:34
  • Helped me too. Too bad that plutil doesn't report this problem.
    – Thomas
    Commented Apr 21, 2014 at 17:07

You must log in to answer this question.

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