Launchd scheduled job always returns exit code:1
May 31 09:33:00 Constellation launchd: backup.work: exited with exit code: 1
May 31 09:33:00 Constellation launchd: backup.work: 9 more failures without living at least 60 seconds will cause job removal
I've tried changing the script so it does something minimal:
#!/bin/bash
cd /scratch
and even this returns an exit code of 1!
Permissions:
-rwxr-xr-x 1 root wheel 87 May 31 09:32 backup
( They are User agent, and using Lingon to create the job)
The script runs fine in terminal.
Plist:
<?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>Debug</key>
<true/>
<key>Label</key>
<string>backup.work</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>/usr/local/bin/backup</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>21</integer>
<key>Minute</key>
<integer>5</integer>
</dict>
</dict>
</plist>
Any suggestions would be great!
Thanks
PB G4, Mac OS X (10.4)