Most pedals usually last for over three years. A few can last for more than ten years and even a lifetime. The durability of your pedals depends on how often you use them and the riding terrain. If you use them frequently, you may want to consider changing them sooner than later.
Pedal wear also depends on how much pressure you put on them during rides. For example, if you run up hills, you might experience more significant wear than flat terrain. You should, hence, consider changing your pedal when they wear out and their efficiency has degraded. Hence, there is no specified amount of years or months your pedals must take before they are changed. It all depends on whether they are usable or not.