You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
426 B
20 lines
426 B
10 years ago
|
//load database
|
||
|
var Datastore = require('nedb');
|
||
|
|
||
|
var exec = require('child_process').exec;
|
||
|
var fs = require('fs');
|
||
|
|
||
|
exports.crontabs = function(db_name, callback){
|
||
|
var db = new Datastore({ filename: __dirname + '/crontabs/' + db_name });
|
||
|
db.loadDatabase(function (err) {
|
||
|
});
|
||
|
db.find({}, function(err, docs){
|
||
|
callback(docs);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
exports.delete = function(db_name){
|
||
|
fs.unlink(__dirname + '/crontabs/' + db_name);
|
||
|
}
|
||
|
|