Using jquery and the interval function is their anyway that I could refresh my page at 6 and 7 everyday or would I need to use another method that could be better?
Asked
Active
Viewed 95 times
-3
-
3@Joe SNow, What have you tired so far ? Why do you want to do this ? – Rayon Aug 17 '15 at 13:15
-
1@RejithRKrishnan the OP has asked for everyday and 6-7 is the time of the day or eve – Meenesh Jain Aug 17 '15 at 13:18
-
I have different parts of the page that change at different parts of the day. My charts only need to be updataed at 6 and 7 am . – Joe SNow Aug 17 '15 at 13:18
-
1Refer this [http://stackoverflow.com/questions/1217929/how-to-automatically-reload-a-web-page-at-a-certain-time](http://stackoverflow.com/questions/1217929/how-to-automatically-reload-a-web-page-at-a-certain-time) – Rayon Aug 17 '15 at 13:24
1 Answers
0
for something such custom requirement
You need something like this
<script>
$(document).ready(function() {
setInterval(function(){
var dt = new Date();
var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
$gethour = dt.getHours();
if($gethour=="18" || $gethour=="06" || $gethour=="19" || $gethour=="07" ){
// post your code here
window.location.reload();
}
},1000);
});
</script>
this might work for you :)

Meenesh Jain
- 2,532
- 2
- 19
- 29