Efficient task scheduling plays a critical role in cloud computing environment. In this paper, we proposed a novel trust-based fruit fly optimisation algorithm (TFOA) for task scheduling. Even though traditional scheduling algorithms, namely first come first serve, round robin, ant colony optimisation and so on are used broadly in cloud computing process but still efficient scheduling is not achieved. In general cloud service provider desires to receive the customer task in a faster rate allocated on the most trustworthy resource by using TFOA. Simulation outcomes show that the proposed algorithm performs better than the existing transitional algorithms like round robin and particle swarm optimisation (PSO) in terms of reduced makespan and turnaround time and efficient resource utilisation. © 2020 Inderscience Enterprises Ltd.