William Tudor admitted the charges at an earlier hearing
A butcher has been jailed for a year for food safety offences which led to a fatal E.coli outbreak in 2005.
Cardiff Crown Court heard that a vacuum-packing machine, "wrongly used" for both raw and cooked meats, was the source of contaminated meat to schools.
William Tudor, 54, from Cowbridge, Vale of Glamorgan, had admitted six charges, including supplying contaminated meat from his meat business in Bridgend.
One boy died and 157 others, mainly children, became ill in the outbreak.
The court heard Tudor's premises failed to guard against the risk of cross-contamination.
Judge Neil Bidder said that while Tudor was a pillar of society he had substantial culpability and a custodial sentence would send out a message to other food producers.
Five-year-old Mason Jones died in hospital after becoming ill
He told Tudor that he put the health of the public at risk for the sake of saving money.
Mason Jones, five, from Bargoed in the Rhymney Valley, died in hospital two weeks after eating the contaminated ham and turkey at his school canteen, the judge was told.
Prosecutor Graham Walters said Mason had hallucinations and kidney failure before his death in the early hours of 4 October 2005.
He said that Mason "fought for his life for the best part of a week" before dying.
Tudor's business, John Tudor and Son, had a contract to supply cooked meats for school dinners at primary schools across south Wales.
Within days of the contaminated cooked meat being delivered in September 2005, a number of pupils fell ill with symptoms of diarrhoea, said Mr Walters.
An outbreak of E.coli O157 was confirmed, leading to 157 cases being investigated - 109 of which involved 44 schools.
He said it developed into the UK's second largest outbreak and Tudor's plant was closed down.
Blood on trays
Mr Walters said one vacuum-packing machine was "wrongly used" for both raw and cooked meats.
"It was not uncommon for juices from raw meat to get into the vacpacker.
"There was blood on the trays and workers were having to wipe it off while they were packing cooked meat.
"One employee said he was told by Tudor not to use the vacpacker for cooked meat whenever food inspectors were visiting."
He said health inspectors found "fundamental failures" in cleaning, including congealed debris and dirt on the vacpacker.
The premises were closed down because of the "grave" risk to health
"Tudor was asked how it was cleaned and he produced a dirty brush and bucket."
Despite Tudor taking his advanced food hygiene standards certificate in 2004, a log of the cleaning records for the machinery had not been completed.
Mr Walters said: "There was a simple failure to guard against the risk of cross contamination. Cleaning was inadequate."
Tudor admitted charges relating to six schools, including supplying contaminated meat to Deri Primary School in Bargoed, where Mason Jones was a pupil.
The other charges involve five more junior and primary south Wales primary schools.
He pleaded guilty to charges under the General Food Regulations of "placing unsafe food on the market".
A seventh charge of failing to protect food against the risk of contamination at his factory was also admitted.
After the sentence, Stephen Webber of Hugh James solicitors, said families were disappointed at the length of Tudor's sentence.
He said the outbreak had a "tragic outcome" for Mason Jones and his family and "further drastic effects upon a large number of families in south Wales".
"Some of these children still do not know whether they have made a full recovery and continue to have treatment."
He said the families hoped systems would be put in place after a public inquiry into the outbreak, chaired by food expert Professor Hugh Pennington.
It is expected to begin next February.