how far apart should I take medicine?

I was prescribed cephalexin at the er for uti and I already took one pill. it says take 4 times a day daily until all gone but never gives me a hour frame I can take it.. online says every 6hrs for 250mg and every 12hrs for 500mg and I have the 500mg capsule.. i’m 5 weeks pregnant so I don’t want to overdo it. and every 12 hrs is not 4 times a day more like two or three times a day..