During a disruption, actionable insights generated from real-time data of the disrupted system can be used to dynamically recalibrate mitigation and recovery responses but there is currently a paucity of investigation on such assessment and management of resilience in real time. In this study, we propose the concept of real-time resilience to encapsulate the capacity of a disrupted system to continuously recalibrate its responses and minimize its damage. Quantitative metrics to assess the real-time resilience are also established. Subsequently, a digital-twin-based control for mechanical ventilation systems was developed as a tool to enable real-time resilience against airborne infection in indoor spaces. For demonstration, numerical simulations were performed with the adoption of the new tool in an indoor food court. Results showed that the gross resilience of the diners was enhanced in terms of improvements to the metrics of disruption duration (26%–61%), loss of resilience (2%–39%), and average rate of recovery (26%–74%). At the same time, the tempo-spatial variations suggested that increasing the ventilation rate increased the dilution and dispersion of infectious aerosols simultaneously, which can have opposing effects on individual resilience depending on the diner’s location. The trade-off between real-time resilience and energy use was discussed based on the results. Practical applications: This study proposed a new tool based on the concept of real-time resilience to control ventilation to mitigate the indoor transmission of airborne infectious disease. The tool utilized numerical simulations to assess the tempo-spatial variation of infection risks and determine the adaptive changes needed for risk mitigation based on the predictive assessment. The evaluation of the tool using the proposed metrics of real-time resilience was demonstrated and the results showed that adoption of the tool can lead to improvements in disruption duration, loss of resilience, and average rate of recovery for diners in a food court.