Cloud computing has been widely adopted in practical applications due to its strong calculating ability and high parallel feature. Although cloud computing can achieve significant cost reduction and flexibility enhancement, it results in a serious task scheduling problem. As one of the key techniques for automate management of cloud resources, task scheduling plays an important role in improving system utilization and supporting load balancing. In this article, we focus on the scheduling problem of independent tasks in cloud environment with heterogeneous and distributed resources. First, with models of resources and tasks, we present an exact formulation based on linear programming to fully search solution space and produce optimal allocation schemes for tasks. Then, inspired from the differential evolution method, we propose a population‐based approach to allocate tasks to their suitable resources such that the total time cost would be minimized. Experiments with multi‐task sets are conducted to show the convergence and efficiency of the proposed approach.