Cloud computing environments play a crucial role in modern computing infrastructures, offering scalability, flexibility, and cost-efficiency. However, optimizing resource utilization and performance in such dynamic and complex environments remains a significant challenge. This study addresses this challenge by proposing a novel framework that integrates Fruit Fly Optimization (FFO) with Convolutional Neural Networks (CNN) for task scheduling optimization. The background emphasizes the importance of efficient resource allocation and management in cloud computing to meet increasing demands for computational resources while minimizing costs and enhancing overall system performance. The objective of this research is to develop a comprehensive framework that leverages the complementary strengths of FFO and CNN to address the shortcomings of traditional task scheduling approaches. The novelty of the proposed framework lies in its integration of optimization techniques with advanced data analysis methods, enabling dynamic and adaptive task allocation based on real-time workload patterns. The proposed framework is thoroughly evaluated using historical workload data, and results demonstrate significant improvements over traditional methods. Specifically, the FFO-CNN framework achieves average response times ranging from 120 to 180 milliseconds, while maintaining high resource utilization rates ranging from 90% to 98%. These results highlight the effectiveness of the FFO-CNN framework in enhancing resource utilization and performance in cloud computing environments. This research contributes to advancing the state-of-the-art in cloud resource management by introducing a novel approach that combines optimization and data analysis techniques. The proposed framework offers a promising solution to the challenges of resource allocation and task scheduling in cloud computing environments, paving the way for more efficient and sustainable cloud infrastructures in the future.