I want to make my stepper motor work for 1 hour
The problem you have is you are treating minutes and hours separately. That won't work - they need to be combined.  As it stands your "on" time is:


Minutes greater than W, and
Hours greater than X, and
Minutes less than Y, and
Hours less than Z.


Or, to rearrange that:


Hours between X and Z, and
Minutes between W and Y.


You can see that won't work. You will only get "on" for the block of minutes between W and Y for each hour in your "ON" period.

For example, if you want ON from 9:30 to 12:45, you get:


If hours greater than or equal to 9 and less than or equal to 12, and
Minutes greater than or equal to 30 and less than or equal to 45


So, that's 9:30 to 9:45, 10:30 to 10:45, 11:30 to 11:45 and 12:30 to 12:45

Even worse if you want 9:30 to 12:00...  the second part of the IF above becomes:


Minutes greater than or equal to 30 and less than or equal to than 0.  


That can never happen. There is no number that is both greater than 30 and less than 0.

So you have to combine the two values together, to create a "minutes since midnight" value. Then your ON time is decided by the number of minutes, not the hours and the minutes separately.  It's simple enough:

int minutesSinceMidnight = myRTC.hours * 60 + myRTC.minutes;


Your ON time then becomes, for 9:30, 9 * 60 + 30 = 570, to 12:00 = 12 * 60 + 0 = 720.

So:

if (minutesSinceMidnight &gt;= 570 &amp;&amp; minutesSinceMidnight &lt;= 720) {
    // Do your stepping
}