A Mansfield carer risked being sent to prison when he missed probation appointments after assaulting his dying wife.
Liam Botcher's probation manager recommended prison for him after he missed three dates, said prosecutor Donna Facwcett.
He was originally sentenced to a community order for two assaults on his wife of 30 years, but a restraining order was amended in July so he could live with her again.
His wife, who suffers from multiple sclerosis and diabetes, "wanted him to care for her," said Donna Pursglove, mitigating.
"At the time of the assaults he was using cannabis and amphetamine but says he is now clean," she said.
"He says what happened was a turning point and says "I can't carry on that way. I need to care for her."
"I think things became just too much for them all at that time."
Botcher's wife had been given 12 to 18 months to live in February, and Botcher said he "pushed the order to one side to give all my time and attention to my wife."
"It is coming up to a particularly critical time," said Ms Pursglove. "She wants him to care for her."
Botcher, 47, of Hucklow Court , admitted the breaches when he appeared at Mansfield Magistrates Court, on Wednesday.
District judge Jonathan Taaffe said: "The fact of the matter is, having known you were in breach of the order, you failed over the last two months to cooperate in any way or shape with the probation service.
"The public have a right to expect that where people breach these orders, the courts will deal with these breaches in a way that has teeth.
"It is wrong to add worry or misery to the little time she has left."
He gave Botcher 12 weeks in prison, suspended for 18 months.
For more cases from Mansfield Magistrates Court, click here.