There are numerous safety interlocks and any one of those or the control board that they feed could be intermittent or failing. It is really hard to say without some proper diagnostics. It can get quite expensive shooting in the dark. The best place to start is with the theory of operation and trouble-shooting charts in the manual.
Depending on what else is going on, how well things were maintained, and the state of the house after 24-years (additions, insulation, windows, doors, etc.), it may be quite an efficiency increase to start to consider replacement. While some of the rebates and tax credits no longer apply, it really depends on where you live - some utility companies still have some really good, generous ones. An intermittent heating system is a disaster waiting to happen, especially if the house is vacant at all during the coming winter months.