i wolud like to ask, how can i use setTimeout
i wrote a for loop and setTimeout must be performed at the loop and every one second a msg log comes in log
Code: Select all
for (var i = 0; i < 3; i++) {
(function (index) {
setTimeout(function () {
await job.log(LogLevel.Info,index);
}, index * 5000);
})(i);
}