launchd keeps respawning script job
OS 10.10.5 Yosemite
I have a simply plist to run a script once per day at 3:35AM. Unfortunately, as soon as the script completes, it gets restarted, over and over again. Since this is an administrative task, to be run by root, the plist is in /Library/LaunchDemons/.
<?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.rukbat.neptune</string> <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>/usr/local/etc/neptune-backup.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>3</integer> <key>Minute</key> <integer>35</integer> </dict> </dict> </plist>
I've tried adding / deleting multiple different entries for Disabled, KeepAlive, StartInterval, you name it. No matter what I do, as soon as I "load" the plist with LaunchCtr, the script starts running. If I manually kill the process, it simply restarts. What is cute is that I am copying a 4 gig file over a network connection. As soon as the copy completes, the script restarts, zeroing the file and copying it again. I can do all sorts of tricks, like checking for the existence of the file, to work around this problem. However, I would rather know what I am doing wrong with LaunchD.
MacBook Air, OS X Yosemite (10.10.5)