Some call Tasker the most versatile application ever created for Android, and I'm inclined to side with them. The app can automate hundreds of actions and bundle them together in powerful scripts that do exactly what you want them to do (see our Tasker review). Want to silence your phone at night and then restore the ringer to a predefined volume in the morning? No problem. How about popping up a menu of music apps when you plug in your headphones? You got it.
However, the Tasker "task" that brandall from xda created today takes the cake when it comes to complexity and functionality.