How do to Interval timer

Have a look at Using millis() for timing. A beginners guide Your requirement is really just BlinkWithoutDelay with different on/off periods

If precise timing is required get a Real Time Clock module