A formal mathematical framework for a distributed task planning method suitable for computerintegrated manufacturing systems is proposed. All pertinent algorithms are derived. A detailed timing analysis associated with primitive actions and activities (complex tasks) execution is presented. A formal language is designed for event tracking and error specification. Based on the derived language, an error recovery mechanism (automaton) is proposed. A case study demonstrates the applicability of the presented method with and without error occurrences.