Dynamic schedule "Create gap" action

My pucks can only be scheduled in valid working periods. How do I open a gap of say 90 minutes and shift all the pucks (to the right of the gap) along whilst making sure they stay in valid working periods / days and maintain the same order. This should split up larger pucks to fit them into valid periods. I’m currently trying to do this with an action but its timing out when I have a lot of pucks to be moved.