Question about the depo shot

Is it best to get a depo shot while on your period or off?