With the development and widespread application of cloud computing platforms, efficient task scheduling has become the key to improving the performance and resource utilization of cloud computing systems. In order to improve the efficiency of task scheduling on cloud computing platforms, a simulation framework for task scheduling on cloud computing platforms is constructed, and the Grey Wolf optimization (GWO) algorithm is improved, combined with the Random Walk (RW) algorithm to optimize task scheduling on cloud computing platforms. The simulation results show that the maximum completion time of the research method is lower than that of GWO algorithm and RW algorithm. During the task completion process, the RWGWO algorithm has the lowest execution cost and the highest virtual machine resource utilization efficiency. When the number of virtual machines is 4, RWGWO has an average improvement of 12.33% and 5.12% compared to RW algorithm and GWO algorithm, respectively. The research method not only reduces the maximum completion time, but also reduces costs, which can effectively save cloud resources.