launchd Generator

Generate a macOS LaunchAgent or LaunchDaemon plist from a form.

Program arguments

When to run

Environment & I/O

Environment variables
<?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.job</string>
		<key>ProgramArguments</key>
		<array>
			<string>/usr/bin/true</string>
		</array>
		<key>RunAtLoad</key>
		<true/>
	</dict>
</plist>

Install

~/Library/LaunchAgents/com.example.job.plist

launchctl bootstrap gui/$(id -u) "~/Library/LaunchAgents/com.example.job.plist"

or, on older macOS:

launchctl load -w "~/Library/LaunchAgents/com.example.job.plist"

Unload: launchctl bootout gui/$(id -u)/com.example.job

Edge Tools by Islam Answers
01:56 PM