This paper aims at scheduling bag-of-tasks (BoT) applications under budget constraints on hybrid clouds for minimizing the makespan. To solve this NP-hard problem, we propose a novel firefly algorithm (NFA) in which the evaluation of a firefly consists of two steps: (1) mapping a firefly to a scheduling solution (a task sequence); (2) calculating the solution's objective (its corresponding makespan). In the first step, different from the well-known ranked-order value (ROV) rule, we propose a distancebased mapping operator that relies on the distance between a firefly and the brightest one to determine the mapping relationship between a firefly and a solution. We use a probability model in which solutions corresponding to fireflies closer to the brightest one would have higher probabilities to inherit tasks from the current best solution. In this manner, these solutions can inherit more ''good genes'' hidden inside the current best solution to evolve into more high-quality solutions. In the second step, we employ an effective heuristic to evaluate solution objectives. We further develop a composite heuristic to generate the initial best solution, providing the proposed NFA with a good start. We also establish a new movement scheme such that fireflies distant from the brightest one can explore a wide range in the search space, whereas fireflies nearby the brightest one can search in a small neighborhood. Experimental results show that, by employing the above-mentioned strategies, NFA outperforms the standard firefly algorithm and the existing best algorithm, in terms of scheduling effectiveness and computational efficiency. Specifically, the distance-based mapping operator is verified to be both more effective and more efficient than the ROV rule. The composite heuristic is capable of generating a good initial solution, leading to the high quality of the final schedule. The movement scheme can further reduce the makespan of BoT applications.