javascript - Start background process in node (loopback) -


i trying start process in loopback "archives" part of database every 5 minutes. right starting archiver bootscript schedule every 5 minutes via setinterval:

// boot/start_archiver.js  setinterval(function(){   console.log("starting archiver");   building_archiver.archivebuildings();   room_archiver.archiverooms(); }, 300000);     // archive every 5 minutes 

i have feeling not correct way of doing this, seems loopback api unresponsive whenever archiver runs.

how can outsource archiver call different process runs separate api? can point me in right direction or me find framework?


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -