How can rotate the servo motor every certain time?

The demo Several Things at a Time illustrates the use of millis() to manage timing without blocking. It may help with understanding the technique.

Have a look at Using millis() for timing. A beginners guide if you need more explanation.

millis() can be used for short term timing but you will need an RTC for time-of-day timing.

...R