If someone forgets the adkhar that are to be recited for specific reasons, can he say them when he remembers them?
Question

I often forget the adhkar which are to be said at specific times, such as the dhikr for entering or exiting the mosque, or before and after Wudu, or when getting into the car, so I say them when I remember them. So if I enter the mosque and I forget the du`a, then I say it when I am inside, or when I exit the house and I say the du`a when I am outside, so that I will be protected from all directions and in all places, and so that I get used to reciting dhikr and do not forget it, will I attain the reward for that, and will I be protected from all ills?
Praise be to Allah.With regard to the adhkar that are connected to specific reasons, if the Muslim forgets to say them, then remembers them, either he remembers it after the reason for it is gone, or he remembers it before that.
If he remembers it before the reason for it is gone, such as the dhikr for getting onto a mount or into a car, if he remembers it when he is still on his mount or in his car, then it is recommended for him to say the dhikr, because the reason for it is still there.
But if he remembers it after the reason for it has gone, then the opportunity to recite this dhikr has been missed because the reason for it is gone.
Ibn ‘Allan (may Allah have mercy on him) said:
With regard to the adhkar that are connected to specific reasons, such as the dhikr for seeing the new moon, or hearing thunder, and the like, it is not recommended to make them up when the reason for them is gone. Even though I do not know any scholar who mentioned this ruling, the jurists have stated something which may indicate that, such as when they said concerning the [nafil] prayer that is offered for a reason, such as greeting the mosque, that it is not recommended to make it up if the reason for it is no longer there, in contrast to the five daily prayers."(Al-Futuhat ar-Rabbaniyyah  1/149).
This applies to every nafil act of worship that is done for a specific reason; these acts are not to be made up if the reason for them is gone.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
Nafil acts of worship are of two types: one for which there is a specific reason and one for which there is no specific reason.
That for which there is a reason is no longer required once the reason for it is gone, and it is not to be made up. One example of that is the prayer to greet the mosque. If a man comes and sits down and remains seated for a long time, then he wants to offer the prayer to greet the mosque, it will not count as greeting the mosque, because that is a prayer that is done for a reason and is connected to a reason, and once that reason is gone, that prayer is no longer prescribed.
Another example, as seems to be the case, is the days of ‘Arafah and 'Ashura. If someone delays fasting on the day of ‘Arafah or the day of 'Ashura, with no excuse, then there is no doubt that it cannot be made up and he will not benefit if he does make it up, meaning that he will not attain the same reward as one who fasted on the actual day of ‘Arafah or 'Ashura.
But if that day came and he had an excuse for not fasting – such as a woman who is menstruating or bleeding following childbirth, or someone who is sick –  then what appears to be the case is that he does not have to make it up, because that fast is specified for a particular day, and the ruling no longer applies once this day is over."(Majmu‘ Fatawa wa Rasa’il ash-Shaykh Ibn ‘Uthaymin  20/43).
But even if the Muslim misses specific adhkar such as these, he can make up for it by reciting any general dhikr or du‘a’, because they are among the greatest means by which a person may protect himself from harm in all situations.
And Allah knows best.