The 27-year-old, who had turned up outside the 'Friends With Benefits' star's Beverly Hills gym three days in a row last year, was also placed on probation for five years and will spend six months in a rehabilitation centre, reported E! Online.
Dunn has repeatedly been arrested in his pursuit of Kunis, 29. He was arrested in February 2012 after being found living in an apartment she owns, and again in May after he waited for her for three days outside her gym.
He had been in custody since his May 4 arrest. Los Angeles superior court Judge George Lomeli gave Dunn credit for 528 days he spent in jail. He was also ordered to stay away from Kunis's agents, managers and assistants.
Photos: Tamannaah Bhatia sizzles in metallic gown
Photos: Arjun Kapoor and Raj Thackeray at event in Mumbai
In pictures: Here are the fastest ODI centuries in cricket history
'Shaadi No. 1': 10 famous Bollywood weddings in pictures
Photos: Shah Rukh Khan, Shweta Bachchan at Karan Johar's book launch