The removal of about 80 metres of cable from a theft hot-spot at Golcar Viaduct in Huddersfield led to major disruption on the Transpennine route between Manchester Airport and Newcastle last June.
The delays meant Network Rail had to pay compensation of around £15,000 to the affected train operators.
Prosecutor Claire Larton told Bradford Crown Court that repairs to the cabling cost £3,100, but the cost of inconvenience to rail travellers could not be quantified.
Homeless 48-year-old Robert Law later weighed in the stolen copper cabling at a local scrap yard and was paid £26.40 for it.
Three days later Law went back to the same location and stole 50 metres of data link cable.
On that occasion there was no delay caused but it cost another £3,135 to repair.
Miss Larton said when Law weighed in that second amount of cabling he was paid only £10.40.
The court heard that Law had more than 90 offences on his record with almost half them being dishonesty matters.
He failed to turn up at court for a hearing in December last year and was only arrested on a warrant a month ago.
Law admitted two charges of cable theft and a further offence of possessing a lock-knife on his initial arrest in June last year.
Miss Larton said investigating officers were at the scrapyard when Law turned up and they realised he matched the description of a man seen on CCTV footage.
Law’s barrister Ian Brook said he now realised that such offences were totally unacceptable.
He was without any form of income for about six months and it was in that state of vulnerability that he was invited by a friend to take part in the “escapade’’.
Recorder Paul Isaacs jailed Law for two years on the theft matters with an additional two months for possession of the lock-knife.