The gaining popularity of the Internet of Things (IoT), big data analytics, and blockchain to make the digital world connected, smart, and secure in the context of smart cities have led to increasing use of the cloud computing technology. Consequently, cloud data centers become hungry for energy consumption. This has an adverse effect on the environment in addition to the high operational and maintenance costs of large-scale data centers. Several works in the literature have proposed energy-efficient task scheduling in a cloud computing environment. However, most of these works use a scheduler that predicts the power consumption of an incoming task based on a static model. In most scenarios, the scheduler considers the CPU utilization of a server for power prediction and task allocations. This might give misleading results as the power consumption of a server, handling a variety of requests in smart cities, depends on other metrics such as memory, disk, and network in addition to CPU. Our proposed Intelligent Autonomous Agent Energy-Aware Task Scheduler in Virtual Machines (IAA-EATSVM) uses the multi-metric machine learning approach for scheduling of incoming tasks. IAA-EATSVM outperforms the mostly used Energy Conscious Task Consolidation (ECTC) based on a static approach. The detailed performance analysis is elaborated in the paper.