The cloud computing is considered the latest network infrastructure that supports the decentralization of computing. The main features of the cloud are the possibilities for building applications and providing various services to the end user by virtualization on the internet. One of the main challenges in the field of the cloud computing is the task scheduling problem. Task scheduling problem concerns about the dynamic distribution of the tasks over the cloud resources to achieve the best results. Many of the algorithms have been existed to resolve the task scheduling problem such as a Particle Swarm Optimization algorithm (PSO).