RTC + pump+solenoid

I am trying to design a soak system to avoid dairy cows getting stressed. The main objective is to soak cows back and to provide an evaporative cooling through fans installed in the barn.

I am reading DS1307RTC library and I don´t find a way to arduino read hour intervals, like,

if time it´s between 4a.m. and 10:a.m, then do something.

If the code could be written using delay(), it would be simpler, but I need the code getting temperature, waiting for buttons being pushed down while sketch is running.

I don´t find how to make arduino recognize hour intervals with Real time clock.. Someone have an idea?

Something like this?

if (rtc.h > 3 && rtc.h < 11) 
// do stuff

yes, something like that, but I don´t find any tutorial or example with that ideia

But what more do you need? You asked about how to read hour intervals and that's what I showed.

Check the RTC library that you use to see what it calls an hour: might be h, or hr, or Hour, so my syntax might not be exactly correct. But I have used exactly that idea before....

I assume you do have an RTC and can (say) display the time, so far?