Endstops for stepper motor

Robin2:
What should happen when the power is restored? The Arduino will have no means to tell where the stepper is or whether it should move towards A or B.

I've been brainstorming on this issue. The intent has been to have an RTC included so that start times could be programmed at specific times. Thinking I could code it to calculate which rotation direction (if either) it was in when interrupted based on the start times. If it was at a state of rest when the interruption occurred, it would still have one of the 2 switches closed. Then I would have to make it check to see if it should have started the other direction or not.

It doesn't have to be at a certain point in its rotation at a certain time. Just has to rotate consistently. And being stopped in the middle of a turn due to an outage, or the like, won't matter either.

Would probably also code it to turn all the way to left side every morning prior to actual use.