Maurice Hotchkiss, 32, targeted a jeweller in East Lothian after serving only part of his sentence for an earlier robbery, which a judge described as "virtually a carbon copy".
His latest attempt left businesswoman Caroline Brown terrified, but she defied warnings from Hotchkiss and managed to raise the alarm.
Advertisement
Hide AdAdvertisement
Hide AdHotchkiss pleaded guilty to attempting to rob Ms Brown of jewellery and cash.
Sentencing him, judge Lord Woolman said: "Your criminal record makes depressing reading", noting a list of 30 convictions since 1994.