[launchd-dev] Respawn if job SucessfulExit=false but when started by StartCalendarInterval condition instead of RunAtLoad

Roger perrog at gmail.com
Sun Aug 29 10:57:33 PDT 2010


Hi!
Why does KeepAlive with SuccessfulExit imply RunAtLoad by default,
instead of getting the exit status from the job runned by
StartCalendarInterval?
I'm asking because I want to schedule a job on weekdays around 6:00
pm, and if my script exit unsuccessfully (or successful; it doesn't
matter), I want launched to retry every 30 minutes until script exits
successfully, or until next time in StartCalendarInterval.
Or does it already work but with some other property?
TiA
Roger

Excerption of my schedule:

<?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>KeepAlive</key>
	<dict>
		<key>SuccessfulExit</key>
		<false/>
	</dict>
	<key>RunAtLoad</key>
	<false/>
	<key>StartCalendarInterval</key>
	<array>
		<dict>
			<key>Hour</key>
			<integer>18</integer>
			<key>Minute</key>
			<integer>00</integer>
			<key>Weekday</key>
			<integer>1</integer>
		</dict>
		<dict>
			<key>Hour</key>
			<integer>18</integer>
			<key>Minute</key>
			<integer>00</integer>
			<key>Weekday</key>
			<integer>2</integer>
		</dict>
		<dict>
			<key>Hour</key>
			<integer>18</integer>
			<key>Minute</key>
			<integer>00</integer>
			<key>Weekday</key>
			<integer>3</integer>
		</dict>
		<dict>
			<key>Hour</key>
			<integer>18</integer>
			<key>Minute</key>
			<integer>00</integer>
			<key>Weekday</key>
			<integer>4</integer>
		</dict>
		<dict>
			<key>Hour</key>
			<integer>18</integer>
			<key>Minute</key>
			<integer>00</integer>
			<key>Weekday</key>
			<integer>5</integer>
		</dict>
	</array>
	<key>ThrottleInterval</key>
	<integer>1800</integer>

</dict>
</plist>


More information about the launchd-dev mailing list