This paper introduces an optimal scheduling framework for the Earth observation tasks of multiple agile satellites based on nonlinear modeling of attitude change time for the task transition. An attitude control module using a quaternion feedback constructs the database storing the time to complete the attitude change maneuver for a given initial and final attitude pair. A mixed-integer linear programming (MILP) formulation for optimal satellite task scheduling based on the generated transition time database is developed. The database can accurately estimate the task transition time and ensure the feasibility of the obtained solution. A P-MILP heuristic, which can prune out unnecessary constraints of the original MILP formulation and obtain near-optimal solutions for large problem instances, is proposed. A comprehensive case study on the task scheduling to operate agile satellites validates the proposed framework and heuristic.