You've already forked crontab-ui
mirror of
https://github.com/alseambusher/crontab-ui.git
synced 2025-12-15 11:43:58 +08:00
new:dev:support run the jobs manually
This commit is contained in:
@@ -74,6 +74,15 @@ exports.get_crontab = function(_id, callback) {
|
||||
});
|
||||
};
|
||||
|
||||
exports.runjob = function(_id, callback) {
|
||||
db.find({_id: _id}).exec(function(err, docs){
|
||||
var res = docs[0];
|
||||
exec(res.command, function(error, stdout, stderr){
|
||||
console.log(stdout);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Set actual crontab file from the db
|
||||
exports.set_crontab = function(env_vars, callback){
|
||||
exports.crontabs( function(tabs){
|
||||
|
||||
Reference in New Issue
Block a user