A court heard that a teenage boy 'cheered himself up' by taking an eight-tonne bulldozer for a joyride.
The 15-year-old from Truro walked free from court after pleading guilty to a separate charge of threatening people with a 10-inch butcher's knife on another occasion.
The unnamed boy was told by magistrates that both incidents 'were reckless and highly dangerous and could have ended with a fatality'.
The West Briton newspaper reports that the bulldozer was being used by Cornwall council's construction department for work on a cycle path. The 15-year-old, along with another teenager, was reported to the police after a member of the public spotted him driving it around a playing field.
The Crown Prosecution Service's representative Gail Hawkley told the court that the authorities received an anonymous tip-off about the teens' escapades.
"Police received an anonymous call at about 6pm on March 24 saying two youths were driving a digger around on Malabar playing field," she said, adding that the arm of the digger was swinging around and smashing tree branches causing £1,875 of damage.
When police arrested the teenager he told them he had taken the vehicle because he wanted to cheer himself up.
His solicitor Deborah Von Kohle told the court that digger had been left with the keys in the ignition and that it 'must have been an irresistible temptation' to the boys.
Truro Magistrates also heard that the same boy pulled a knife on other teenagers during an argument back in May.
Ms Hawkley said: "He put his hand down his jogging bottoms and pulled out a knife. He was described as waving the knife around.
"As everyone moved back, the defendant fled the scene and disappeared through a nearby hedge."
His mum told the court that her son was sorry for what he had done.
"He is no angel – what teenage child is? He has shown a lot of remorse for what has happened," she said.
The boy was ordered to pay £520 in compensation, and undergo a youth rehabilitation order and an 18-month supervision order as well as observing a 12-week 7pm to 7am curfew on Thursday, Friday and Saturday. He was also given a 12-month driving ban.