RTC combined with servo

Hello
I have a project and part of it involve an rtc and a servo. see attachment
I already built the circuit but I have some problems with the sketch.
The objective of the project is :
after every 3 hours the servo automatically turn 60 degrees.
hope you could help me in the sketch
Thanks in advance

It would help us to help you if you were to post your code (in code tags) and describe what it is doing that you don't like.

All I have is some guesses.
If the servo has much of a load on it the Arduino power supply may not be enough and the Arduino will reset when the power supply shuts down.

Are there pullup resistors on the SDA and SCL lines?

You should not power a servo from the Arduino 5v pin. It may damage the Arduino because it draws too much current and it will quite likely interfere with the working of the Arduino by reducing the 5v to a point where the Arduino resets.

Give the servo its own power supply - perhaps 4 x AA batteries. Make sure the servo GND is connected to the Arduino GND.

...R