Medication dose help

I was prescribed to take medication twice daily for a week. Would I be able to take one now and then again when I wake up? Would it still be effective? It’s for a urinary infection