The efficiency of task scheduling under cloud computing is related to the effectiveness of users. Aiming at the problems of long scheduling time, high cost consumption, and large virtual machine load in cloud computing task scheduling, an improved scheduling efficiency algorithm (called the improved whale optimization algorithm, referred to as IWC) is proposed. Firstly, a cloud computing task scheduling and distribution model with time, cost, and virtual machines as the main factors is constructed. Secondly, a feasible plan for each whale individual corresponding to cloud computing task scheduling is to find the best whale individual, which is the best feasible plan; in order to better find the optimal individual, we use the inertial weight strategy for the whale optimization algorithm to improve the local search ability and effectively prevent the algorithm from reaching premature convergence; we use the add operator and delete operator to screen individuals after each iteration which is completed and updated to improve the quality of understanding. In the simulation experiment, IWC was compared with the ant colony algorithm, particle swarm algorithm, and whale optimization algorithm under a different number of tasks. The results showed that the IWC algorithm has good results in terms of task scheduling time, scheduling cost, and virtual machine. The application is in cloud computing task scheduling.