What I am looking to do is,

I have a roster where I have automatically works the hours out but the
problem I have is if the person works more than 5 hours they take a half an
hour break and if they work more than 8 hours they are entitled to a 1 hour
break.

How can I get this to happen automatically

Thanks in advance

Greg