Due to the continual advancements in the Internet of Things (IoT), which generate enormous volumes of data, the cloud computing infrastructure recently has received the most significance. to meet the demands made by the network of IoT devices. It is anticipated that the planned Fog computing system would constitute the next development in cloud computing. The optimal distribution of computing capacity to reduce processing times and operating costs is one of the tasks that fog computing confronts. In the IoT, fog computing is a decentralized computing approach that moves data storage and processing closer to the network's edge. This research article discusses a unique technique for lowering operating expenses and improving work scheduling in a cloud-fog environment. Non-dominated sorting genetic algorithm II (NSGA-II) is a proposal that is presented in this paper. Its purpose is to allocate service requests with the multi-objective of minimising finishing time and running cost. Determining the Pareto front that is associated with a group of perfect solutions, which are sometimes referred to as non-dominated solutions or Pareto sets, is the fundamental objective of the Pareto NSGA-II. There is a contradiction between the environmental and economic performances, which is shown by the Pareto set of sub-optimal solutions that are the consequence of the bi-objective issue.