var h = new Date().getMinutes(); if(location == 'index.html' && h > 0 && h < 47){ location = 'index2.html'; }