Run function at set interval only at certain time of the day
问题 I am currently running a function at regular interval round the clock. setInterval( function(){ do_this(); } , 1000*60); Unfortunately, this is not exactly what I want. I would like this function to be run at set regular interval from morning 0900hrs to 1800hrs only. The function should not run outside of these hours. How can this be done in node.js? Are there convenient modules or functions to use? 回答1: You can simply just check to see if the current time is within the desired time range or