Integrating cloud computing with wireless sensor networks creates a sensor cloud (WSN). Some real-time applications, such as agricultural irrigation control systems, use a sensor cloud. The sensor battery life in sensor clouds is constrained. The data center’s computers consume a lot of energy to offer storage in the cloud. The emerging sensor cloud technology-enabled virtualization. Using a virtual environment has many advantages. However, different resource requirements and task execution cause substantial performance and parameter optimization issues in cloud computing. In this study, we proposed the hybrid electro search with ant colony optimization (HES-ACO) technique to enhance the behavior of task scheduling, for those considering parameters such as total execution time, cost of the execution, makespan time, the cloud data center energy consumption like throughput, response time, resource utilization task rejection ratio, and deadline constraint of the multicloud. Electro search and the ant colony optimization algorithm are combined in the proposed method. Compared to HESGA, HPSOGA, AC-PSO, and PSO-COGENT algorithms, the created HES-ACO algorithm was simulated at CloudSim and found to optimize all parameters.