check validity of timed task, start time must be earlier than end time.