2

I am trying to do a non-stop rss reader with the ortoo-feedparser module.

What is the simplest solution to check the new feed every x minutes ? Do I need a database ?

This is my code :

var feedparser = require('ortoo-feedparser');

var url = "website.com/rss.xml";

feedparser.parseUrl(url).on('article', function(article){
    console.log(article.title);
});
Kaayo25
  • 23
  • 3

1 Answers1

0
// In minutes
var intervalTime = x * 60 * 1000;

// To start polling
var interval = setInterval(pollingFunc, intervalTime);

// To finish polling
clearInterval(interval);
arboreal84
  • 2,086
  • 18
  • 21