Scheduling task via launchctl
I have Time Machine set to start manually as I would prefer to have it do its thing when I'm not at my desk.
To that end, I have created two launchctl plist files, one for a nightly backup, the other for a periodic snapshot. The periodic snapshot works fine; I can see the output in the logs. The nightly backup doesn't work at all, and for the life of me I can't figure out why. Both plist files are in ~/Library/LaunchAgents.
Here's for the backup:
<?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.example.TimeMachineBackup</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/tmutil</string>
<string>startbackup</string>
<string>--auto</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>21</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/me/Library/Logs/com.example.TimeMachineBackup.out.log</string>
<key>StandardErrorPath></key>
<string>/Users/me/Library/Logs/com.example.TimeMachineBackup.err.log</string>
</dict>
</plist>
And here's for the snapshot:
<?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.example.TimeMachineSnapshot</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/tmutil</string>
<string>localsnapshot</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>StandardOutPath</key>
<string>/Users/me/Library/Logs/com.example.TimeMachineSnapshot.out.log</string>
<key>StandardErrorPath></key>
<string>/Users/me/Library/Logs/com.example.TimeMachineSnapshot.err.log</string>
</dict>
</plist>
For the life of me, I can't figure out why the first one won't run.