When I worked in airline ops, we scratched our heads and nuts, sucked pencils, drank beers, shoved earplugs in to drown the sound of ringing phones and moaning pax, and then decided what to do.
Seriously though, no hard and fast rules, other than minimise costs and passenger complaints, the two requirements being mutually exclusive. Then suicide is the answer.