launchd是MacOS X中最好的部分之一,它讓我非常痛苦,無法在其他系統上找到它。
編輯和地方這/Library/LaunchDaemons
爲com.you.wiki.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.you.wiki</string>
<key>LowPriorityIO</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>Nice</key>
<integer>1</integer>
<key>WorkingDirectory</key>
<string>/Users/stuartcw/Documents/Wiki/moin-1.7.2</string>
<key>UserName</key>
<string>user to run this as</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
<string>wikiserver.py</string>
</array>
</dict>
</plist>
全部細節在這裏:http://developer.apple.com/MacOsX/launchd.html 我目前正在考慮將它放入我的LaunchAgents文件夾。 「如果它只在用戶登錄時纔有用,請將其放入/ Library/LaunchAgents或特定用戶的個人LaunchAgents目錄中。」 – stuartcw 2008-12-03 12:46:37