मैंने लॉन्च के साथ होमब्रे को समय पर अपडेट करने की कोशिश की। मेरी फ़ाइल यहाँ प्रस्तुत है:
<?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>ms.liu.homebrew.update</string>
<key>UserName</key>
<string>LiuMS</string>
<key>ProcessType</key>
<string>Background</string>
<key>EnvironmentVariables</key>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/brew</string>
<string>update</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>20</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/usr/local/logs/ms.liu.homebrew.update.out</string>
<key>StandardErrorPath</key>
<string>/usr/local/logs/ms.liu.homebrew.update.err</string>
</dict>
</plist>
यह किसी भी तरह काम करता है: मैं launchctl start ms.liu.homebrew.updateअपने होमब्रे को अपडेट करने के लिए मैन्युअल रूप से निष्पादित कर सकता हूं। हालांकि, लॉन्चड समय-समय पर इस सेवा को निष्पादित नहीं करता है: फ़ाइल में अंतिम परिवर्तन जो दो दिन पहले रीडायरेक्ट करता है।
मैंने इस सेवा के बारे में जानकारी प्राप्त करने की कोशिश की लेकिन कुछ नहीं मिला:
> launchctl print user/%MyPID%/ms.liu.homebrew.update``
Could not find service "ms.liu.homebrew.update" in domain for uid: %MyPID%
ऐसा लगता है कि मैंने अपनी सेवा सफलतापूर्वक लोड नहीं की है। कैसे? मैंने इस्तेमाल किया launchctl loadलेकिन ऐसा लगता है कि इसे हटा दिया गया है। मैन पेज इसके बजाय बूटस्ट्रैप की सिफारिश करता है:
> launchctl bootstrap user/%MyPID% %Path-to-plist%
> %Path-to-plist%: Service cannot load in requested session
मुझे क्या करना चाहिए? कैसे ठीक से launchctl bootstrapऔर उपयोग करने के लिए launchctl print?
मैं रेटिना डिस्प्ले (2013) के साथ मैकबुकप्रो पर ओएस एक्स योसेमाइट जीएम कैंडिडेट 1 चला रहा हूं।