In recent years, ongoing advancements in the Industrial Internet of Things (IIoT) have yielded massive volumes of data, taxing the capabilities of cloud computing infrastructure. Allocating limited computing resources to numerous incoming requests is one of the difficulties of cloud computing, which is typically referred to as a Task-Scheduling-in-Cloud-Computing (TSCC) problem. In order to ameliorate the performance of a particle swarm optimizer (PSO) and broaden its application to TSCC, this paper introduces an Opposition-based Simulated Annealing Particle Swarm Optimizer (OSAPSO) to address PSO's premature convergence issue, particularly when tackling high-dimensional complex problems like TSCC. OSAPSO is a novel combination of opposition-based learning (OBL), evolution strategy, simulated annealing (SA), and swarm intelligence. At its initial stage, the swarm is formed at random by using OBL to guarantee swarm diversity with a light computational burden. A multi-way tournament selection approach is then utilized to pick parents to produce a new offspring swarm by using two novel evolutionary operators, namely, damping-based mutation and inversion-scrambling-based crossover. OSAPSO is given a powerful exploration capacity by adopting the survivor probabilistic selection of SA, which accepts subpar solutions with a certain probability. Finally, PSO itself kicks in, making a good trade-off between solution diversity and convergence speed of the proposed method. Due to the non-convex discontinuous nature of TSCC, OSAPSO is modified to clone it into a discrete optimization problem. Within a heterogeneous cloud computing environment, OSAPSO and eight well-regarded competitors are examined on a set of multi-scale IIoT heterogeneous task groups (realistic and synthetic). In terms of power consumption, monetary cost, service makespan, and system throughput, experimental results reveal that OSAPSO has a winning performance and is statistically more This paragraph of the first footnote will contain the date on which you submitted your paper for review. It will also contain support information, including sponsor and financial support acknowledgment.