diff --git a/crontab.js b/crontab.js index 48b88b4..69d9012 100644 --- a/crontab.js +++ b/crontab.js @@ -175,7 +175,8 @@ exports.import_crontab = function(){ var namePrefix = new Date().getTime(); lines.forEach(function(line, index){ - var regex = /^((\@[a-zA-Z]+\s)|(([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s))/; + line = line.replace(/\t+/g, ' '); + var regex = /^((\@[a-zA-Z]+\s+)|(([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+))/; var command = line.replace(regex, '').trim(); var schedule = line.replace(command, '').trim(); diff --git a/public/js/script.js b/public/js/script.js index 39fc8b9..5d08916 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -67,7 +67,7 @@ function setCrontab(){ } function getCrontab(){ - messageBox("

Do you want to get the crontab file?

", "Confirm crontab retrieval", null, null, function(){ + messageBox("

Do you want to get the crontab file?
NOTE: It is recommended to take a backup before this. And refresh the page after this.

", "Confirm crontab retrieval", null, null, function(){ $.get(routes.import_crontab, { "env_vars": $("#env_vars").val() }, function(){ // TODO show only if success infoMessageBox("Successfuly got the crontab file!","Information"); @@ -183,7 +183,7 @@ function setMailConfig(a){ let data = JSON.parse(a.getAttribute("data-json")); let container = document.createElement("div"); - let message = "

This is based on nodemailer. Refer this for more details.

"; + let message = "

This is based on nodemailer. Refer this for more details.

"; container.innerHTML += message; let transporterLabel = document.createElement("label");