Scheduling is a process that allocates resources to the competing tasks. The distribution of the resources to the various tasks forms a job. The aggregation of the tasks within the job, determine the optimal utilization of the resources and minimal completion time and costs. This paper demonstrates the scheduling problem in the grid applications, considering single-grid and multi-grid environments. Petri Net is used for modeling the system, and the models are implemented with the GPenSIM tool. Also, this paper presents an algorithm for scheduling in multi-grid, in which the modules give the right to each other to use one others resources without causing delays. The novelty of this algorithm is that while it is easy to implement, it is also efficient as it minimizes the total processing time of the jobs.