pull/18/head
alseambusher 2016-09-01 11:10:11 -07:00
parent 1c7011f355
commit d59e2b5ea9
3 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,7 @@ crontab = function(name, command, schedule, stopped, logging){
data.name = name;
data.command = command;
data.schedule = schedule;
if(stopped != null) {
if(stopped !== null) {
data.stopped = stopped;
}
data.timestamp = (new Date()).toString();

View File

@ -11,9 +11,8 @@ exports.crontabs = function(db_name, callback){
db.find({}).sort({ created: -1 }).exec(function(err, docs){
callback(docs);
});
}
};
exports.delete = function(db_name){
fs.unlink(__dirname + '/crontabs/' + db_name);
}
};

View File

@ -13,4 +13,4 @@ exports.routes = {
"import": "/import", // this is import from database
"import_crontab": "/import_crontab", // this is from existing crontab
"logger": "/logger",
}
};