how to set the delay on for 7 hours?
Yes, absolutely, it should work. But your code will be easier to read if
you use some constants, like:

const unsigned long SECOND = 1000;
const unsigned long HOUR = 3600*SECOND;

delay(7*HOUR);