10.7 Launchd + rvm
I found a way to make a RVM
-based rake
command work with launchd
:
/bin/bash -l -c '/absolute/path/to/myscript.sh'
My script was calling rake
. I wasn't calling it directly.
Have you tried using an absolute path for your unicorn_rails
?
The .plist
looks like:
<?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>mylabel</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-l</string>
<string>-c</string>
<string>/absolute/path/to/myscript.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>10</integer>
<key>Minute</key>
<integer>00</integer>
</dict>
</dict>
</plist>