As popularity and demand of the cloud increases day by day it is also facing various challenges and problems. In cloud middleware, scheduler plays an important role. To make best use of resources, reducing execution time and cost and fulfilling the client's requirements, the scheduler has to schedule all the tasks to the resources while considering all these issues. Due to heterogeneous nature of the cloud environment, it is difficult to find an optimal scheduling method for cloud environments. For cloud computing environment, an online scheduling algorithm is proposed.