There are dozens of variables that come into play in airline scheduling. These include (not every variable applies in every case) block times, gate availability, runway slots, terminal capacity limitations, handling equipment availability, customs/immigration availability, noise curfews, crew rest periods, crew duty times, etc...