In order to find the best cloud computing task scheduling scheme and shorten task completion time of cloud computation, by a comprehensive consideration of advantages of genetic algorithm and ant colony algorithm, we proposed a new cloud computing task scheduling and optimization algorithm based on genetic algorithm and ant colony algorithm. Firstly, genetic algorithm was used to search feasible scheme of cloud computing task scheduling. Secondly, feasible scheme was used to initialize pheromone distribution of ant colony algorithm, to solve problem of lack initial pheromone, to speed up convergence speed and search ability, and to improve the efficiency of cloud computing tasks. Finally the experimental results on CloudSim platform show that compared with genetic algorithm. The proposed algorithm is more suitable for solving the problem of largescale cloud computing tasks, which shortens task scheduling time, and user satisfaction is higher.