最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jquery - How can I run a loop with a 15 min interval using Javascript - Stack Overflow

programmeradmin0浏览0评论

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.

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.

Share Improve this question edited Jan 26, 2016 at 17:46 gariepy 3,6746 gold badges23 silver badges34 bronze badges asked May 28, 2013 at 6:04 sinsin 1112 silver badges6 bronze badges 4
  • 1 I'm confused. Are you trying to create a list of times with 15 minute intervals, or to run some thing every 15 minutes from some arbitrary start time, or from a particular start time, or to run something at specific times that just happen to be at 15 minutes intervals? – RobG Commented May 28, 2013 at 6:09
  • Don't downvote for a new bee... – Prasath K Commented May 28, 2013 at 6:19
  • 1 no dont want to run somthing in evry 15 min – sin Commented May 28, 2013 at 6:30
  • stackoverflow./questions/1197928/… This might be helpful for you I think. – Ms. Nobody Commented May 28, 2013 at 6:40
Add a ment  | 

1 Answer 1

Reset to default 9
setInterval(function() {
 //  I will run for every 15 minutes
}, 15 * 60 * 1000);
发布评论

评论列表(0)

  1. 暂无评论