The optimization of task scheduling in cloud computing is built with the purpose of improving its working efficiency. Aiming at resolving the deficiencies during the method deployment, supporting algorithms are therefore introduced. This paper proposes a particle swarm optimization algorithm with the combination of based on ant colony optimization, which proposes the parameter determination into particle swarm algorithm. The integrated algorithm is capable of keeping particles in the fitness level at a certain concentration and guarantee the diversity of population. Further, the global best solution with high accurate converge can be exactly gained with the adjustment of learning factor. After the implementation of proposed method in task scheduling, the scheme for optimizing task scheduling shows better working performance in fitness, cost as well as running period, which presents a more reliable and efficient idea of optimal task scheduling.