You've already forked crontab-ui
mirror of
https://github.com/alseambusher/crontab-ui.git
synced 2025-12-15 11:43:58 +08:00
Ability to view stdout added
This commit is contained in:
@@ -95,6 +95,7 @@ exports.set_crontab = function(env_vars, callback){
|
||||
let stderr = path.join(cronPath, tab._id + ".stderr");
|
||||
let stdout = path.join(cronPath, tab._id + ".stdout");
|
||||
let log_file = path.join(exports.log_folder, tab._id + ".log");
|
||||
let log_file_stdout = path.join(exports.log_folder, tab._id + ".stdout.log");
|
||||
|
||||
if(tab.command[tab.command.length-1] != ";") // add semicolon
|
||||
tab.command +=";";
|
||||
@@ -106,6 +107,11 @@ exports.set_crontab = function(env_vars, callback){
|
||||
"; then date >> \"" + log_file + "\"" +
|
||||
"; cat " + stderr + " >> \"" + log_file + "\"" +
|
||||
"; fi";
|
||||
|
||||
crontab_string += "; if test -f " + stdout +
|
||||
"; then date >> \"" + log_file_stdout + "\"" +
|
||||
"; cat " + stdout + " >> \"" + log_file_stdout + "\"" +
|
||||
"; fi";
|
||||
}
|
||||
|
||||
if (tab.hook) {
|
||||
|
||||
Reference in New Issue
Block a user