As DocHeb mentioned, there are several things that can cause a problem. Here are some pictures of the cruise magnet. It's the round donut-looking object in the first picture. You can see the wire going to it and the connector. The second picture shows the "B" shaped plate installed. The cruise magnet just holds the plate to maintain the position of the HST pedals where they are when you press the cruise button. These photos are with the operator platform lifted, so don't expect to see this area as easy from the bottom, looking up.
The prime suspect for cruise not working is the brake pedal switch. If it is out of adjustment or faulty, the cruise magnet will not stay engaged. It is 'saying' your brakes are applied when they are not, thus disengaging cruise.
There have also been some reports on TBN of the cruise magnet being faulty or burned out. You can check that with an ohmeter, but I'd check other things first.
There is a latch relay and diodes that hold the cruise magnet engaged. These could also be a problem, but to check them, you have to remove the cowling below the steering wheel and that's a pretty big job.
You don't need to have the tractor engine running to check cruise. All you have to do is turn on the key to activate cruise. With the key on, move your HST pedal and press the cruise switch. You should hear a click and the pedal should hold. Press the switch again and the HST pedal should be released. If you don't hear the click or if you hear it only as long as the switch is pressed, there's a good chance the problem is the brake switch. Look directly above the brake pedals under the left side operator platform. An arm goes up and engages a switch. That switch must be adjusted properly for the cruise to work. With the brake pedals in normal position, the switch should be adjusted until it closes. When the brake pedals are pressed the switch should open. Normally an out of adjustment switch will slide back and not be closed when the brakes are released.
Let us know what you find or if you need some more help.