One of the main issues in distributed computing systems is to determine an optimal task-scheduling method. In this paper, we present an effective algorithm to schedule a directed acyclic graph onto a heterogeneous distributed system, called the Earliest Starting and Finishing time Duplication based (ESFD) algorithm. Our proposed algorithm considers all parameters associated with the processors, the task, and its immediate predecessors to perform an effective task allocation. The ESFD algorithm is a three-phase algorithm with a dynamic phase to assign a priority to each task. Simulation results on both random graphs and real application graphs show that the network storage link, speedup, and efficiency generated by ESFD algorithm are better than those generated by the well-known Heterogeneous Critical Parent Trees, Heterogeneous Earliest Finish Time, and Levelized Heavily Communicating Node First algorithms.