This article designs a cleaner production scheduling model for defective products with flexible rework rate and shortages by considering the transportation cost as proportional to pandemic intensity. The model incorporates a variable setup cost and carbon emissions originating from various activities, both of which are targeted for reduction through investments in green technologies. The main aim of this work is to determine optimal production strategies for firms operating in emergency situations like pandemics, conflicts, and other unforeseen circumstances. The scenario is mathematically formulated with the objective of minimizing both total cost and overall emissions by optimizing decision variables such as production lot size, backorder, setup cost, and green investment. A numerical example is stated to validate the mathematical formulation, and the discussion of parameter effects on optimal solutions, along with managerial insights, is conducted through sensitivity analysis.