Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Chirlinn BenChirlin

View GitHub Profile
@BenChirlin
BenChirlin / socialcron.js
Created Aug 13, 2012
Node Cron with HTTP chained requests and request example
View socialcron.js
var Db = require('mongodb').Db;
var Server = require('mongodb').Server;
var cronJob = require('cron').CronJob;
var UpdateSocial = require('./socialupdate.js').UpdateSocial;
var mydb = new Db('node_mongo_social', new Server('localhost', 27017, {auto_reconnect: true}, {}));
mydb.open(function(){});
// Init
console.log("Starting cron");