2010-10-24, 17:50
Just as the title says, how can i accomplish this? I have a certain script that i want to have executed on boot.
Thanks!
Thanks!
nano -w ~/Library/LaunchAgents/com.MySpecialScript.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.MySpecialScript</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>1800</integer>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>[color=red]path/to/your/script.sh[/color]</string>
</array>
</dict>
</plist>
Amet Wrote:add the path of your "certain" script to /etc/rc.local
or:
Code:nano -w ~/Library/LaunchAgents/com.MySpecialScript.plist
paste the following into it:
Code:<?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.MySpecialScript</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>1800</integer>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>[color=red]path/to/your/script.sh[/color]</string>
</array>
</dict>
</plist>
press ctrl-x, press Y, press return to get back to command prompt and reboot
NOTE: untested