We optimized the conditions for the in situ annealing that follows the off-axis pulsed laser deposition of MgB2 thin films. The influence on the superconductivity of the two major annealing parameters, which are the dwell time, tau(ann), and the sintering temperature, T-ann, was investigated. The optimal annealing conditions regarding the transition temperature were obtained by analysing the change in the critical temperature, T-c, with different dwell times and sintering temperatures. X-ray diffraction (XRD) theta-2 theta scans on the two series of films confirm the sole MgB2 phase composition in the best T-c film with a zero resistance T-c of 34.2K and transition width of 0.5K. The film also shows good critical current density J(c) performance in magnetic fields.