As energy harvesting communication systems emerge, there is a need for transmission schemes that dynamically adapt to the energy harvesting process. In this paper, after exhibiting a finite-horizon online throughput-maximizing scheduling problem formulation and the structure of its optimal solution within a dynamic programming formulation, a low complexity online scheduling policy is proposed. The policy exploits the existence of thresholds for choosing rate and power levels as a function of stored energy, harvest state and time until the end of the horizon. The policy, which is based on computing an expected threshold, performs close to optimal on a wide range of example energy harvest patterns. Moreover, it achieves higher throughput values for a given delay, than throughput-optimal online policies developed based on infinite-horizon formulations in recent literature. The solution is extended to include ergodic time-varying (fading) channels, and a corresponding low complexity policy is proposed and evaluated for this case as well.