Task management on node.js