You can take the GRE anytime as long as it's before the five year deadline. What I mean by that is most schools will not accept a GRE score that is over five years old. This can be tricky though because the countdown starts when you matriculate, not when you apply. For instance, I'm applying to the class of 2021 so I would matriculate in Fall 2017. Therefore any GRE scores before Fall 2012 would not be counted. Also, I believe it depends on the particular school what their rules are, but I think in general that is how it works.