I am not in the department that deals with scheduling, but I can help out with the how. All aircraft are tracked on time, cycles, etc. Based mostly on MX
scheduling and planning, any open DMI/MEL
items and the like they are able to determine which aircraft to fly where to keep the a/c staggered for the various checks they have to go through (i.e. "C" checks where they are out of service for a few days at a time).