How to tell a guy you're on your period?

So, I've been hanging out with this guy for a few weeks now and we usually always have sex when we hang out. I'm on my period right now and obviously can't have sex. I know he is going to try to whenever we hang out tonight, and I'm not sure how to tell him. Should I let him know before hanging out with him over text or should I let him know if he tries to have sex?