scenario: when a piece of data is created successfully, it is regularly determined to modify and update the data
testModel.create({name:"a",num:2},function(err,doc){
if(doc){
setTimeout(do,gettime())
function do(){
update
}
}
})
express framework uses mongoose to connect mongodb,. Is it feasible to use setTimeout,setInterval in the actual production environment? of course, node also has many timing modules. How do you deal with scheduled tasks like above?