Extinction

At what point does a species realize it's going extinct that it takes action to avoid extinction?