I had this working before. But the system got hosed by a power surge, and like a damn idiot, I didn’t have a backup. Some of what I had was recoverable, and so the shell script and the plist are exactly as they were before, but not working.
I have a shell script, sweep.sh, that sweeps files in specified directories, with a specified extension, into a pair of external SSDs:
#!/bin/bash
cd /Users/mercury
cp *.savf /Volumes/BACKUP/mercury
mv *.savf /Volumes/BACKUP2/mercury
cd /Users/venus
cp *.savf /Volumes/BACKUP/venus
mv *.savf /Volumes/BACKUP2/venus
exit 0
When I call this script from the command line, it works fine.
But I have a launch daemon with the following plist:
Label
sweep
Program
/Users/europa/sweep.sh
StartCalendarInterval
Hour
14
Minute
30
It’s been tripped twice (and launchctl print system/sweep confirms that it’s there, and says “runs = 2” and “last exit code = 0”), but nothing actually happened!