Need a little more information before anyone can give you a really good answer.

1) German or Soviet?

2) FRB or Construction EE units?

3) Weather conditions?

The German FRB (and Soviets later in the game) can be directed by the player. If they have the movement points, you really shouldn't have any problems with them.

The Soviet Construction EE units assign to HQs seem more hit or miss. While they will generally work, mine usually work first on tail circuits leading no where or the absolutely least useful rail lines to repair. And some turns they just seem to sit there.

And you need to make sure that the construsction EE units have a "valid" rail line to the hexes that need repair - ie, all the rail lines are in Soviet control and not German control otherwise they won't try to repair them. Even then, sometimes they just seem like they like to take a vacation.

German FBD units and their Soviet counterparts are player controlled and won't do anything automatically. The various German construction units and Soviet RR construction units are not player controlled and work automatically, but they are subject to the same rules regarding range as FBD's. INfact I can't ever remember seeing one of these types of units ever repairing a rail line hex that wasn't a direct continuation of already repaired rail. It's also important to remember that the automatic type units are restricted to working within the command radius of the HQ to which they are attached. Consequently (usually in 1941) the construction units atttached to German Korp and Army HQ's won't repair rail lines because those HQ's are typically too far away from the nearest railhead. I get around this by moving all construction units to the Army Group HQ's as these have an enormous command range, such that you sometimes see the units from Army Group North working in Army Group Centre's or even Army Group South's area (and vice versa). I move the construction units back to Korp and Army HQ's as and when I want to use them for building forts later in the year.

Just getting into WitE myself, trying different things. Playing the Leningrad scenario as Axis vs. AI, I managed to race Panzers to Tallinn and capture the city on turn 2 or 3. Reasoning that that would be a port through which supplies could come, I wondered if I could send my FBD unit up there along with its HQ to start repairing rail lines in the easterly direction toward Leningrad.

Alas, it didn't work. Had to send FBD back down to nearest railhead at Riga to get it repairing again.