Javascript, Call function in a specific time interval.

Himalaya Pagada
May 20, 2022
window.setInterval(function(){ // Set interval for checking
var date = new Date(); // Create Date object for a reference point
if(date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() < 10){ // Check the time like above
generateSliders();}
}, 60000); // Repeat every 60000 milliseconds (1 minute)

--

--