Depends a lot on what the tasks are. If I understand your question, you can do this two ways: 1, run a function with a timer, and 2, spawn a child process.
1
function taskA(){...}
setInterval(taskA,5000);
2
//same code as 1, but in a child process
var spawn = require('child_process').spawn,
ls = spawn('taskA.js');
//taskA.js has the code from example 1
You might prefer 2 to 1 if you are doing a lot of other things in the main process, because node is single threaded. It should also be noted that there are likely better ways to do this in certain circumstances. For example, in a cloud-based webapp, I might rely on the PAAS's services to run the background task. You also might want to look into https://github.com/nodejitsu/forever-monitor
Here's a great article on how to handle background jobs in webapps. https://devcenter.heroku.com/articles/background-jobs-queueing It isn't node specific, however. It is also specific to the Heroku platform.