We propose a comprehensive framework for the optimal day-ahead scheduling of power distribution systems (PDS), based on a mixed-integer linear programming (MILP) model. The interaction between transmission system operator (TSO) and distribution system operator (DSO) is considered, where TSO informs DSO of the day-ahead forecast concerning the expected power flow (PF) commitment at the TSO-DSO interconnection points and the violation costs. We propose a MILP model to determine the optimal voltage and power settings of distributed energy resources (DERs), such as dispatchable distributed generators and energy storage units and optimal adjustments of capacitor banks controlled by current. The objective function includes the minimization of energy losses, voltage violations, power curtailment of DERs using volt-watt strategy, and violation of TSO-DSO interconnection PF commitment. Furthermore, we propose a method to estimate the degree of uncertainty in the PF commitment. Therefore, the proposed method can help achieve an optimal operation of the distribution system; in addition, the TSO can best model uncertainty at TSO-DSO interface points and thereby procure reduced amounts of resources to address these uncertainties. Numerical results obtained for a system based on real data highlight the several potential applications of the proposed framework.