Cloud computing is a model for convenient on-demand user’s access to changeable and configurable computing resources such as networks, servers, storage, applications, and services with minimal management of resources and service provider interaction. Task scheduling is regarded as a fundamental issue in cloud computing which aims at distributing the load on the different resources of a distributed system in order to optimize resource utilization and response time. In this paper, an optimization-based method for task scheduling is presented in order to improve the efficiency of cloud computing. In the proposed approach, three criteria for scheduling, including the task execution time, the task transfer time, and the cost of task execution have been considered. Our method not only reduces the execution time of the overall tasks but also minimizes the maximum time required for task execution. We employ the Multi-objective Non-dominated Sorting Genetic Algorithm (NSGA-II) for solving the scheduling problem. To evaluate the efficiency of the proposed method, a real cloud environment is simulated, and a similar method based on Multi-Objective Particle Swarm Optimization is applied. Experimental results show the superiority of our approach over the baseline technique.