Method for adapting a production flow schedule for one or more production processes which are used to produce one or more end products from one or more raw products or intermediate products and which each have one or more process steps which need energy for their execution, wherein the production flow schedule is created on the basis of an optimization function which optimizes the one or the more production processes with regard to one or more optimization variables, comprising the following steps: - identifying (S2) at least one availability time window in which there is a predefined minimum energy availability within a predefined optimization time period, based on availability information which indicates a forecast energy availability during the optimization time period, and characterized by - ascertaining (S3) those process steps which have time flexibility as flexible process steps , which can be executed in alternative time windows within the optimization time period, without at least one of the optimization variables deviating by more than one optimization variable tolerance value from a value of the optimization variable which is achieved by the original production flow schedule; and - for each of the flexible process steps , rescheduling (S6) the flexible process step into one of the corresponding alternative time windows if the latter lies within the availability time window and if, in the original time window of the flexible process step , there is a lower availability of energy than in the alternative time window, in order to obtain an adapted production flow schedule, and - the step of the respective rescheduling of the corresponding flexible process steps being carried out depending on a probability which is assigned to each forecast energy availability, wherein, in particular, priority is given to rescheduling those flexible process steps into corresponding time windows in which the probability of an energy availability above the minimum energy availability is the highest. - identifying (S2) at least one availability time window in which there is a predefined minimum energy availability within a predefined optimization time period, based on availability information which indicates a forecast energy availability during the optimization time period, and characterized by - ascertaining (S3) those process steps which have time flexibility as flexible process steps , which can be executed in alternative time windows within the optimization time period, without at least one of the optimization variables deviating by more than one optimization variable tolerance value from a value of the optimization variable which is achieved by the original production flow schedule; and - for each of the flexible process steps , rescheduling (S6) the flexible process step into one of the corresponding alternative time windows if the latter lies within the availability time window and if, in the original time window of the flexible process step , there is a lower availability of energy than in the alternative time window, in order to obtain an adapted production flow schedule, and - the step of the respective rescheduling of the corresponding flexible process steps being carried out depending on a probability which is assigned to each forecast energy availability, wherein, in particular, priority is given to rescheduling those flexible process steps into corresponding time windows in which the probability of an energy availability above the minimum energy availability is the highest. <EOS>