launchd Plist Generator

Configure Service

Program Arguments
Schedule Type

Leave fields as "Any" to match all values

Environment Variables
Live XML Preview30 lines
<?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.user.service</string>
  <key>Program</key>
  <string>/usr/local/bin/python3</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/bin/python3</string>
    <string>/path/to/script.py</string>
  </array>
  <key>WorkingDirectory</key>
  <string>/path/to</string>
  <key>StartCalendarInterval</key>
  <dict>
    <key>Hour</key>
    <integer>2</integer>
    <key>Minute</key>
    <integer>0</integer>
  </dict>
  <key>StandardOutPath</key>
  <string>/tmp/service.log</string>
  <key>StandardErrorPath</key>
  <string>/tmp/service-error.log</string>
  <key>ProcessType</key>
  <string>Background</string>
</dict>
</plist>
Install Command
# Copy plist to LaunchAgents directory
cp com.user.service.plist ~/Library/LaunchAgents/

# Load and start the service
launchctl load ~/Library/LaunchAgents/com.user.service.plist

# Check service status
launchctl list | grep com.user.service

# To unload: launchctl unload ~/Library/LaunchAgents/com.user.service.plist

What This Tool Does

launchd Plist Generator is built for deterministic developer and agent workflows.

Generate macOS launchd plist files for daemons and scheduled jobs with calendar intervals, labels, and install commands.

Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/launchd-plist-generator/

For automation planning, fetch the canonical contract at /api/tool/launchd-plist-generator.json.

How to Use launchd Plist Generator

  1. 1

    Create a launchd plist to run a script on schedule

    Input script path (/Users/rusty/bin/backup.sh), label (com.rusty.backup), start interval (3600 for hourly). Generator creates XML plist with proper keys. Save to ~/Library/LaunchAgents/, load with launchctl.

  2. 2

    Configure environment variables for launchd job

    If your script needs $PATH or API keys, generator's 'EnvironmentVariables' section lets you define them. Launchd won't see your shell's .zshrc, so explicit vars are crucial.

  3. 3

    Set up error logging and output redirection

    Generator adds StandardOutPath and StandardErrorPath keys. Redirect script output to /tmp/my-job.log. If job fails silently, check log file for errors. Essential for debugging.

  4. 4

    Schedule cron-like job with StartCalendarInterval

    Instead of Cron notation, launchd uses StartCalendarInterval dict (Day, Hour, Minute, Month, Weekday). Generator converts cron-like schedules to launchd format. Run daily at 2am: Generator creates proper plist.

  5. 5

    Load and test plist before permanent deployment

    After generating plist, save to LaunchAgents/ and run: launchctl load ~/Library/LaunchAgents/com.label.plist. Check if loaded with launchctl list. Verify runs at scheduled time before committing.

Frequently Asked Questions

What is launchd Plist Generator?
launchd Plist Generator is a visual tool for creating macOS launchd plist XML files. It helps you set up daemons and scheduled tasks with calendar intervals, keep-alive settings, and proper XML formatting.
How do I use launchd Plist Generator?
Fill in the form with your label, program path, schedule, and options. The tool generates valid plist XML and provides the launchctl commands needed to install and manage the service on macOS.
Is launchd Plist Generator free?
Yes. This tool is free to use with immediate access—no account required.
Does launchd Plist Generator store or send my data?
No. All processing happens entirely in your browser. Your data never leaves your device — nothing is sent to any server.
What is launchd and when should I use it?
launchd is the macOS system for managing background services and scheduled tasks — it replaces cron on Mac. Use it to run scripts on a schedule, at startup, or when files change.