Fix scheduler script