The advent of hybrid cloud technologies and public Infrastructures as a Service (IaaS) allows service developers to offer services to their customers with little upfront investment and to adapt services to different workload sizes. The problem of minimizing the costs of the hired public infrastructure while providing the quality of service needed by the final customer arises when using hybrid clouds. Several scheduling strategies have been proposed to solve this problem for services dealing with deadline-constrained bag-of-tasks workloads. Most of these solutions do not consider the variable performance of the clouds, the provisioning delay of virtual machine instances that affects the elasticity, and the impracticality of having good processing time estimations in real systems. We propose a scheduler algorithm that overcomes previous limitations and can minimize the cost of the infrastructure while maximizing the number of deadlines met by the service. Our solution can work autonomously by using sampled observations of the processing times and considers the heterogeneity and the provisioning time of the virtual machine instances. An evaluation was conducted by simulating different scenarios and workload types. Simulation results show that our solution obtains better or similar results than previous techniques in most scenarios in terms of deadlines met. KEYWORDS bag-of-task workloads, cloud computing, hybrid cloud, scheduling 1 INTRODUCTION The adoption of the Cloud Computing Paradigm 1 has changed the provision of computational resources. 2 Platforms such as Amazon EC2, Microsoft Azure, or Google Compute Engine offer computational resources under the Infrastructure as a Service (IaaS) paradigm. The main characteristics of these services are 3 : on-demand and self-service resources, virtualized computational resources accessed over broad networks, resource pooling, rapid elasticity, and pay-per-use. IaaS allows service providers to have access to pools of resources under the financial model of pay-per-use. In this scenario, it is very important to optimize the use of the hired resources while meeting the quality of service expected by end-users. The main strategy for this resource optimization is the right management of hired resources and the execution of the application using a suitable scheduler. 4In the case of deadline-constrained applications and workloads, the quality of service is mainly determined by the processing deadline. Therefore, the problem for a service provider is to meet the processing deadline of the jobs submitted by end-users while minimizing the IaaS resources hired to run the service attending the workload (ie, the cost). This is similar to a deadline-constrained job scheduling problem with a dynamic number of heterogeneous machines for the execution of the jobs. The number of machine types is related to the number of virtual machine types available from IaaS providers.Workloads composed of sets of independent jobs or tasks are commonly known as Bag-of-Tasks (BoT) applications. 5 BoT work...