Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run a loop with a 15 min interval using Javascript

How can I run a Javascript loop with a 15 min time interval? It should use 24 hour format. For example, running from 6:00 am to 11:45 pm it would run at 6:00,6:15, 6:30 --- 23:45 etc. These values are displayed as pulldown menu items in html. I am using notepad for javascript and html because I am required to.

like image 253
sin Avatar asked Oct 16 '25 12:10

sin


1 Answers

setInterval(function() {
 //  I will run for every 15 minutes
}, 15 * 60 * 1000);
like image 130
PSR Avatar answered Oct 18 '25 00:10

PSR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!