The question is whether its a one shot triggering ON the relay after 7 hours and thereafter you always leave it ON or its some periodic process where every 7 hours, you want the relay to trigger ON and OFF alternatively. Presuming the latter, this can be done in 2 ways:
1) Configure a hardware timer interrupt to call a small function every second and increment a variable within that function. So after 1 hour your variables value must be 3600, therefore after 7 hours it will be 25,200. Once the variable is equal to 25200, you can ON the relay and reset the variable to 0. Factors such as the number of hardware timers and its resolution differs from one MCU to another.
2) Use a Real Time Clock like the DS1307 for this purpose and save you hardware timers for performing some other time critical operations.
Hope this helps!.