Given the fluctuations in demand, diversity in products, production flexibility requirements, and tight customer due dates, obtaining optimal production schedules is considered a complex research problem. This can drastically affect the survival of some manufacturing companies in today's fiercely competitive global market. In a very demanding decision-making environment, scheduling problems are dealt with in a short-term horizon, in which computation time is a critical factor. Producing optimal solutions is practically impossible given the time limitations and the nondeterministic polynomial (NP)-hard nature of scheduling problems. This paper presents an anytime-heuristic search approach based on a simulation-optimization framework that combines evaluation methods (simulation) and search methods (optimization) through the reachability analysis (or state space) of timed colored Petri net models to schedule flexible manufacturing systems (FMS). The anytime search algorithm is capable of finding a first suboptimal solution very quickly and continuously improves the solution quality over time. If given enough computation time, the algorithm eventually converges to an optimal solution. The proposed approach is aimed at obtaining optimal or near-optimal solutions to FMS scheduling problems in relatively short computation times with the objective of minimizing the makespan. Its effectiveness is highlighted with excellent results that outperform previous methods on benchmark examples with flexible material handling systems, machine, and routing configurations. The approach can also serve as a decision support tool to assist production schedulers that require rapid and almost real-time responses to time-critical production scheduling on the shop floor.