Grid task scheduling (GTS) is a NP-hard problem. This paper proposes an optimized GTS algorithm which combines with the advantages of cloud model based on the particle swarm optimization algorithm. This algorithm iterates tasks utilizing the advantages of particle swarm optimization algorithm and then gets a set of candidate solutions quickly. In addition, this algorithm modifies the value of entropy and excess entropy using the characteristics of cloud model and implements the transformation between qualitative variables and quantity of uncertain events. And this algorithm makes particles fly to the global optimal solutions by exact searching in local areas. Theoretical analysis and simulation results show that this algorithm makes load balance of resource efficiently. It also avoids the problems of genetic algorithm and basic particle swarm optimization algorithm, which would easily fall into local optimal solutions and premature convergence caused by too much selected pressure. This algorithm has the advantages of high precision and faster convergence and can be applied in task scheduling on computing grid.