Cyriel Dessers had already missed a glaring opportunity and James Tavernier had come close with a free-kick before the Czech took a grip of the game.
He saw an initial shot blocked, regathered possession and brilliantly nutmegged Sven Sprangler before executing an inch-perfect curling low shot.
It was exactly the type of moment his manager and Rangers fans will want more of.
Both sides made changes at the break. Connor Barron and Hagi came on for the hosts and Andy Kirk - in his last match as interim manager before Simo Valakari takes charge - bolstered his attacking options.
But St Johnstone could not find a way through.
Mackenzie Kirk had a header diverted behind but the contest was over when Hagi fed Cerny, he danced inside and out, and found the gap to slot in his second.
St Johnstone still had moments. Adama Sidibeh struck one just off target, then Kirk took the wrong choice allowing Butland to save.
Nicky Clark then thought he had set up a frantic finish when he slammed home an excellent finish, but was deemed offside.
The outcome was the right one despite a spirited St Johnstone effort.