Skip to content

Instantly share code, notes, and snippets.

@Planeshifter
Created May 22, 2014 15:25
Show Gist options
  • Save Planeshifter/91d73230b64b2d73a2fd to your computer and use it in GitHub Desktop.
Save Planeshifter/91d73230b64b2d73a2fd to your computer and use it in GitHub Desktop.
Forever TwitterStreamer
var forever = require('forever-monitor');
var path_RRG = "/home/philipp/TwitterStream/"
var child = new (forever.Monitor)('multiple_streams.js', {
sourceDir: path_RRG,
cwd: path_RRG,
silent: true,
options: []
});
child.on('exit', function () {
console.log('The server has crashed');
});
child.start();
setInterval(function(){
child.kill();
console.log('Process terminated')
},3600*1000*4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment