Here is the US, specific aircraft (tail number) assignments are made within a few -days- of actual operation, 3-5 at my airline. The main driver for routings is to get aircraft overnighted at specific places (with maintenance facilities) at specific dates so regular MX
work can be performed during the overnight hours.
When an aircraft goes out of service unexpectedly during the day, it can cause things to get scambled, the severity of which depends upon the nature of the breakdown, the fix, and whether parts and company MX
personnel happen to be at the same airport where the breakdown occurred. Often times, they are not. Contract MX
folks might come out and troubleshoot the problem, then parts (and maybe our own personnel) will ride out on another flight to actually fix the aircraft. In some cases, parts might be borrowed from another airline, and/or the contract MX
folks might do the actual installation. As usual, lots of variables...
If an aircraft was scheduled to start the day at "ABC" and end up at "XYZ" for overnight MX
work, and breaks down somewhere in between during the day, our office will figure out another way to get it to someplace where the MX
work can be accomplished, once the cause of the breakdown is remedied..
ALL views, opinions expressed are mine ONLY and are NOT representative of those shared by Southwest Airlines Co.