There are a few ways I like to extend my battery life on my MacBook Air. These days, it’s increasingly important to conserve battery life as the transition to Mountain Lion (Mac OS X 10.8) has caused my battery life to spiral into so much of a vortex that I am concerned that my laptop must be shooting raw electricity out of the bottom (which would certainly explain why my hair has a tendency to be perpendicular with the ground when I exit a plane). Ever since moving to Mountain Lion (yes, this includes 10.8.2), I’m lucky to get 3 hours of battery life out of the Mac that used…
-
-
Mac OS X: Loading and Unloading with launchd
In Mac OS X you can use cron to schedule tasks but you can also use launchd. To use launchd to load or unload an agent where you’ve setup a task use the launchctl command. Here we will use launchctl to manually start a process given that we defined a plist called /Library/LaunchAgents/com.apple.OpenProgram.plist (where program is maybe the name of some program you want to fire up): launchctl load Library/LaunchAgents/com.apple.OpenProgram.plist Your application should fire up now. Do not quit it for ten seconds. Wait about 15, then quit it. Notice it start up again. This is because it is a launchAgent and will restart any time it is closed. Now…