Objective Efficient scheduling of patient appointments on expensive resources is a complex and dynamic task. A resource is typically used by several patient groups. To service these groups, resource capacity is often allocated per group, explicitly or implicitly. Importantly, due to fluctuations in demand, for the most efficient use of resources this allocation must be flexible. Methods We present an adaptive approach to automatic optimization of resource calendars. In our approach, the allocation of capacity to different patient groups is flexible and adaptive to the current and expected future situation. We additionally present an approach to determine optimal resource openings hours on a larger time frame. Our model and its parameter values are based on extensive case analysis at the Academic Medical Hospital Amsterdam. Results and conclusion We have implemented a comprehensive computer simulation of the application case. Simulation experiments show that our approach of adaptive capacity allocation improves the performance of scheduling patients groups with different attributes and makes efficient use of resource capacity.