Police raided the home of Dionis Cerriku in Streetfield Crescent, Rossington on June 9 this year when they found hundreds of cannabis plants, Sheffield Crown Court was told.
Prosecuting, Neil Coxon, told the court that officers found plants of varying levels of maturity, located in three of the property's bedrooms as well as the kitchen.
He said: "From the kitchen they recovered 160 plants that measured between 11 and 12cms in length.
"Police also recovered 32 plants from a bedroom that were more mature and were 101-103cms.
"In the second bedroom they found a further 39 plants that were measured as being between 88 and 89cms.
"22 plants were recovered in the third bedroom that were the most mature of them all, they were between 111 and 125cms."
In total, officers recovered some 252 plants from the property and 10kg of the Class B drug.
The court was told that should the plants have been allowed to mature, they had the potential to yield hundreds of thousands of pounds worth of cannabis.
Cerriku was arrested, and exercised his right to make no comment in police interview.
He later pleaded guilty to the production of cannabis.
During today's sentencing Recorder Ray Singh gave Cerriku another chance to explain the reason he was growing cannabis in such vast quantities.
Appearing via video link from HMP Doncaster, he said: "It was a job for me."
Recorder Singh sentenced him to two years in prison.
He said: "There was in excess of 250 plants.
"There were being grown across the property.
"If these plants had been capable of being harvested that 10kg would have been sold for a significant amount, with a value stretching into hundreds of thousands of pounds."
He added that he regarded Cerriku to play a significant role in the production of the drugs.
Recorder Singh also made an order for the destruction and forfeiture of all of the plants seized.