Two chaotic orbits can be synchronized by driving one of them by the other. Some of the variables of the driven orbit are set continuously to the corresponding variables of the drive orbit. It has been seen that synchronization can be achieved if the subsystem Lyapunov exponents corresponding to the remaining or response variables are all negative. We find that a procedure where the drive variable is set at discrete times can also achieve synchronization. However, the synchronization criterion is altered by the effect of the drive being set at finite time steps. An important consequence of this is found in the Lorenz system where synchronization can be achieved with z as the drive variable despite the existence of a marginal subsystem Lyapunov exponent. We also find that synchronization can be achieved for the Rossler attractor with z as the drive, even though the largest subsystem Lyapunov exponent is positive. In addition, we find that there is an optimal time step corresponding to the fastest rate of convergence for both cases above. Our synchronization criterion reduces to the usual subsystem-Lyapunov-exponent criterion in the limit of the time step tending to zero.