I am trying to run a job with launchd
which runs a shell script that creates a zip file I then backup.
I am receiving the error: 6/26/13 5:04:37.992 PM com.apple.launchd.peruser.501[162]: (com.ian.evernote[18163]) Exited with code: 1
Here is my launchd plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!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.ian.evernote</string>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>ProgramArguments</key>
<array>
<string>/Users/user/Dropbox/evernote.sh</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Here is my shell script:
#!/bin/bash
sudo zip -r ~/Documents/evernote_backup /Users/user/Library/Containers/com.evernote.Evernote/Data/Library
The shell script runs fine from the terminal. What am I doing wrong?