[ACCEPTED]-How do you implement periodically executing job?-periodic-task

Accepted answer
Score: 11

There's a node package cron which allows you 5 to execute code at some specified interval, just 4 like crontab. Here's a link to the package: https://www.npmjs.org/package/cron

For 3 example:

var cronJob = require("cron").CronJob;

// Run this cron job every Sunday (0) at 7:00:00 AM
new cronJob("00 00 7 * * 0", function() {
    // insert code to run here...
}, null, true);

You might be able to use that module 2 to run some job periodically, which crawls 1 twitter or replies to tweets.

More Related questions