Hourly electricity rates has stimulated the implementation of home energy management systems to reduce the monthly electrical bill in the residential sector. Flexible appliances, whose operation can be delayed and shifted to the off-peak hours, are controlled by the home energy management system considering the scheduling constraint. Scheduling constraints such as the maximum length of the scheduling window are defined by users at the beginning of the scheduling process; then, the scheduling process is initiated. However, the current approach can be challenging for daily usage as it requires the user to update the constraints manually. In this study, we aim to propose a novel approach using a machine learning algorithm to predict the scheduling constraints without user intervention. In this approach, the collected energy consumption profile of each smart appliance can be used to learn the hidden relationship between the constraints and key factors; then, the trained model can predict the desired scheduling window for future observations. By doing so, the scheduling process can be performed by the home energy management system automatically. The proposed approach is validated through implementation on a real dataset where the results showed that it has high accuracy in predicting the desired length of the scheduling window.