Grid computing is a form of distributed computing that involves coordinating and sharing computing, application, data storage or network resources across dynamic and geographically dispersed organizations. The goal of grid tasks scheduling is to achieve high system throughput and to match the application need with the available computing resources. This is matching of resources in a non-deterministically shared heterogeneous environment. The complexity of scheduling problem increases with the size of the grid and becomes highly difficult to solve effectively. To obtain good methods to solve this problem a new area of research is implemented. This area is based on developed heuristic techniques that provide an optimal or near optimal solution for large grids. In this paper we introduce a tasks scheduling algorithm for grid computing. The algorithm is based on simulated annealing method. The paper shows how to search for the best tasks scheduling for grid computing.