Effective surgical prophylaxis depends on timing far more than on prolonging therapy. The bactericidal concentration must already be present in tissue when the scalpel breaks the skin and during entry into the gut.
Guidelines (CDC, SCIP, ASHP) converge on a single window: administer the agent so the infusion is complete within 60 minutes before incision, ideally at induction of anaesthesia. Standard cephalosporins are given in this $30$-$60$ minute slot; agents needing slow infusion (vancomycin, ciprofloxacin) are started up to $120$ minutes prior.
Doses given hours in advance ($4$ h or $6$ h) allow plasma levels to decay below the minimum inhibitory concentration before contamination, and a dose at closure misses the window entirely. A redose is added intra-operatively if surgery is prolonged ($>3$-$4$ h) or blood loss is heavy.
\[\boxed{\text{Within 1 hour (30-60 min) before incision}}\]