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

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -