Grid computing can be defined as applying the resources of many computers in a network to a problem which requires a great number of computer processing cycles or access to large amounts of data.However,in the field of grid computing scheduling of tasks is a big challenge.The task scheduling problem is the problem of assigning the tasks in the system in a manner.Using PSO algorithm with SPV rule to solve the task scheduling problem in grid computing. The aim of using this technique is use the given resources optimally and assign the task to the resources efficiently.