Cpu usage and reboot

I have one specific problem with my RB450 … it was have 2-3 times in day high cpu usage (100 %) . When is this usage high it will stop transfers almost 30 minutes , and then watchguad reboot router. For now I have script for simply reboot every 12 hours and this is not enough. How can I make some script which will monitor CPU usage , and if is going let say 95 % then reboot router ?

Sorry Im find script here http://forum.mikrotik.com/t/a-script-to-calculate-average-cpu-load/20573/3