I've done this in the past and I always overtrain and race too early. I have a bad race and stop training shortly after that.
I've found a much more effective way: Between my wife and I whoever is in the gym less in any given week has to pay the other person on Friday -- around $50. There is still competition (neither of us want to admit to losing) but there is also a very tangible penalty.
The combination is an excellent motivator and neither of us have missed a single day since we started it. It's similar to having a partner (a partner got me through 3 years of weight training in college) except that you don't have to work out at the same time, which is much better for busy people.