One of the important applications of real-time crash prediction analysis lies in the field of proactive traffic management, where instantaneous crash risk evaluation and dynamic decision-making are prerequisites. This research proposes an integrated and advanced real-time crash risk prediction framework for Variable Speed Limits (VSL) and Hard Shoulder Running (HSR) implemented freeways considering their operational periods. Statistical methods are utilized to identify the significant crash contributing factors (related to traffic, roadway geometry, and weather conditions) and explain their relationships with crashes. Time-Embedded Transformer models are proposed to predict the likelihood of real-time crash events. The sensitivity and false alarm rate of the proposed AM peak model are found to be 0.76 and 0.27, respectively, whereas the values are 0.78 and 0.24, respectively for the PM peak model. Additionally, the results indicate substantial improvements in model prediction performance (i.e., an increment of sensitivity values by 7.04% and 8.33% in the AM and PM models, respectively) after incorporating the general safety condition of a freeway segment as an input feature while estimating real-time crash prediction models. Practitioners and policymakers could apply this method to obtain a more accurate real-time crash likelihood estimation, identify important crash precursors, dynamically update algorithms, and enhance safety aspects while operating traffic management strategies on freeways.