I want to start replacing crontabs with LaunchAgents. My first attempt is not working.
<?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.nocturnal.mcworldsBackup</string>
<key>ProgramArguments</key>
<array>
<string>~/bin/mcworldsBackup.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>4</integer>
<key>Minute</key>
<integer>30</integer>
</dict>
</dict>
</plist>
The script mcworldsBackup.sh works fine standalone. I've made it log a timestamp to a file each time it runs and so far launchd has not executed it a single time.
I've checked and repaired the permissions of my Disk using DiskUtility, the plist is in ~/Library/LaunchAgents/com.nocturnal.mcworldsBackup.plist with permissions 0644, same as all the other .plist files already in there. They're all owned by me:staff.
If I grep for mcworldsBackup.sh in /var/log/* I find nothing, no clues as to why it's not being executed.
After I first created the plist I have logged out and logged back in, also rebooted the computer several times even though the documentation says you only need to login.