Look for a timer that has a three-wire connection (power in, power out, and neutral), or that is rated for use with compact fluorescent lamps. That should work. The reason yours did not work is that the timer relies on leakage through the load when it's turned off in order to operate its circuitry. The lighting transformer (which I'm assuming is electronic) is not leaking current the way the timer needs it to.