Cruise Control on 2006 Pontiac G6

My cruise control only works part of the time, why would this hapen?

2 answers
One of the first things I check is the brake switch. The cruise control will not work with the brakes on and if the switch is out of adjustment it can cause it not to work at times. If the brake switch is good then it most likely will need to be diagnosed using a wiring diagram and a troubleshooting tree.
Also, most cruise controls will not engage if the vehicle speed is below 35 mph.