Okay, so i have developing an application which will run 24/7. I only have one problem, if I write like this:
setInterval(getWCProducts , 1000*intervall);
function getWCProducts(){
//code
}
function test(){
console.log("Hello!")
}
test()
It will call test over and over again. It will print "Hello!" about every each secound. Why is the app behaving like this? Obviously the "real" function isn't just going to print "hello!". The real one is a "setup-function" which prepares the app before it starts looping and I can't have it running the setup function over and over again .